aboutsummaryrefslogtreecommitdiff
path: root/weed/command/filer_remote_sync_dir.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2024-01-18 09:16:46 -0800
committerchrislu <chris.lu@gmail.com>2024-01-18 09:16:46 -0800
commit263f1f3d0474364607f33d44d9f34e2645120fec (patch)
tree37b9f5a82dfd30b7ac143a327298b6fdbbba7aae /weed/command/filer_remote_sync_dir.go
parentc8090b1f990fa25ae374bd3040a94b479054d3c4 (diff)
parent83e4b0251710b23121ed44b0f8741f150231a68a (diff)
downloadseaweedfs-263f1f3d0474364607f33d44d9f34e2645120fec.tar.xz
seaweedfs-263f1f3d0474364607f33d44d9f34e2645120fec.zip
Merge branch 'master' into mq-subscribe
Diffstat (limited to 'weed/command/filer_remote_sync_dir.go')
-rw-r--r--weed/command/filer_remote_sync_dir.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/weed/command/filer_remote_sync_dir.go b/weed/command/filer_remote_sync_dir.go
index 00f6d7493..dd3e94be6 100644
--- a/weed/command/filer_remote_sync_dir.go
+++ b/weed/command/filer_remote_sync_dir.go
@@ -278,7 +278,10 @@ func updateLocalEntry(filerClient filer_pb.FilerClient, dir string, entry *filer
}
func isMultipartUploadFile(dir string, name string) bool {
+ return isMultipartUploadDir(dir) && strings.HasSuffix(name, ".part")
+}
+
+func isMultipartUploadDir(dir string) bool {
return strings.HasPrefix(dir, "/buckets/") &&
- strings.Contains(dir, "/"+s3_constants.MultipartUploadsFolder+"/") &&
- strings.HasSuffix(name, ".part")
+ strings.Contains(dir, "/"+s3_constants.MultipartUploadsFolder+"/")
}