fix: doDeleteFiles deletes files (#5198)

This commit is contained in:
Konstantin Lebedev 2024-01-13 00:04:29 +05:00 committed by GitHub
parent 1169f94310
commit 8d23e36c45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -410,7 +410,7 @@ func genProcessFunction(sourcePath string, targetPath string, excludePaths []str
}
// handle deletions
if filer_pb.IsDelete(resp) {
if doDeleteFiles {
if !doDeleteFiles {
return nil
}
if !strings.HasPrefix(string(sourceOldKey), sourcePath) {