instead of direct file access use FileRepo api,
this way the script works for remote backends too.
Change-Id: I08c29cec4bc685c422630487b91458d13184fe94
__METHOD__,
array( 'FOR UPDATE' )
);
- if ( $path && file_exists( $path ) && !$inuse ) {
- if( unlink( $path ) ) { // delete
+ if ( $path && $repo->fileExists( $path ) && !$inuse ) {
+ if ( $repo->quickPurge( $path ) ) {
$count++;
$dbw->query( "DELETE FROM $tbl_arch WHERE fa_id = $id" );
} else {