Index: trunk/phase3/includes/filerepo/ForeignAPIRepo.php |
— | — | @@ -204,7 +204,10 @@ |
205 | 205 | $fileName = rawurldecode( pathinfo( $foreignUrl, PATHINFO_BASENAME ) ); |
206 | 206 | $path = 'thumb/' . $this->getHashPath( $name ) . $name . "/"; |
207 | 207 | if ( !is_dir($wgUploadDirectory . '/' . $path) ) { |
208 | | - wfMkdirParents($wgUploadDirectory . '/' . $path); |
| 208 | + if( !wfMkdirParents($wgUploadDirectory . '/' . $path) ) { |
| 209 | + wfDebug( __METHOD__ . " could not create directory for thumb\n" ); |
| 210 | + return $foreignUrl; |
| 211 | + } |
209 | 212 | } |
210 | 213 | $localUrl = $wgServer . $wgUploadPath . '/' . $path . $fileName; |
211 | 214 | # FIXME: Delete old thumbs that aren't being used. Maintenance script? |