Index: branches/wmf/1.17wmf1/includes/filerepo/LocalFile.php |
— | — | @@ -669,7 +669,13 @@ |
670 | 670 | if ( strpos( $file, $this->getName() ) !== false ) { |
671 | 671 | $url = $this->getThumbUrl( $file ); |
672 | 672 | $urls[] = $url; |
673 | | - @unlink( "$dir/$file" ); |
| 673 | + wfSuppressWarnings(); |
| 674 | + $res = unlink( "$dir/$file" ); |
| 675 | + wfRestoreWarnings(); |
| 676 | + if( !$res ) { |
| 677 | + $err = error_get_last(); |
| 678 | + wfDebugLog( 'purgeThumbnails', __METHOD__ . 'Error deleting' . "$dir/$file: {$err['message']}\n" ); |
| 679 | + } |
674 | 680 | } |
675 | 681 | } |
676 | 682 | |