Index: trunk/phase3/includes/filerepo/FileRepo.php |
— | — | @@ -1083,18 +1083,14 @@ |
1084 | 1084 | } |
1085 | 1085 | $this->initDeletedDir( $archiveDir ); |
1086 | 1086 | |
1087 | | - if ( $backend->fileExists( array( 'src' => $archivePath ) ) ) { |
1088 | | - $operations[] = array( |
1089 | | - 'op' => 'delete', |
1090 | | - 'src' => $srcPath |
1091 | | - ); |
1092 | | - } else { |
1093 | | - $operations[] = array( |
1094 | | - 'op' => 'move', |
1095 | | - 'src' => $srcPath, |
1096 | | - 'dst' => $archivePath |
1097 | | - ); |
1098 | | - } |
| 1087 | + $operations[] = array( |
| 1088 | + 'op' => 'move', |
| 1089 | + 'src' => $srcPath, |
| 1090 | + 'dst' => $archivePath, |
| 1091 | + // We may have 2+ identical files being deleted, |
| 1092 | + // all of which will map to the same destination file |
| 1093 | + 'overwriteSame' => true |
| 1094 | + ); |
1099 | 1095 | } |
1100 | 1096 | |
1101 | 1097 | // Move the files by execute the operations for each pair. |