Index: trunk/phase3/maintenance/deleteArchivedFiles.inc |
— | — | @@ -45,9 +45,12 @@ |
46 | 46 | array( 'FOR UPDATE' ) |
47 | 47 | ); |
48 | 48 | if ( $path && file_exists( $path ) && !$inuse ) { |
49 | | - unlink( $path ); // delete |
50 | | - $count++; |
51 | | - $dbw->query( "DELETE FROM $tbl_arch WHERE fa_id = $id" ); |
| 49 | + if( unlink( $path ) ) { // delete |
| 50 | + $count++; |
| 51 | + $dbw->query( "DELETE FROM $tbl_arch WHERE fa_id = $id" ); |
| 52 | + } else { |
| 53 | + $output->handleOutput( "Unable to remove file $path, skipping\n" ); |
| 54 | + } |
52 | 55 | } else { |
53 | 56 | $output->handleOutput( "Notice - file '$key' not found in group '$group'\n" ); |
54 | 57 | if ( $force ) { |