mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
Merge branch 'pr/5216'
This commit is contained in:
commit
2fa519bcb5
|
@ -278,7 +278,10 @@ func updateLocalEntry(filerClient filer_pb.FilerClient, dir string, entry *filer
|
||||||
}
|
}
|
||||||
|
|
||||||
func isMultipartUploadFile(dir string, name string) bool {
|
func isMultipartUploadFile(dir string, name string) bool {
|
||||||
return strings.HasPrefix(dir, "/buckets/") &&
|
return isMultipartUploadDir(dir) && strings.HasSuffix(name, ".part")
|
||||||
strings.Contains(dir, "/"+s3_constants.MultipartUploadsFolder+"/") &&
|
}
|
||||||
strings.HasSuffix(name, ".part")
|
|
||||||
|
func isMultipartUploadDir(dir string) bool {
|
||||||
|
return strings.HasPrefix(dir, "/buckets/") &&
|
||||||
|
strings.Contains(dir, "/"+s3_constants.MultipartUploadsFolder+"/")
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import (
|
||||||
"github.com/seaweedfs/seaweedfs/weed/replication/sink"
|
"github.com/seaweedfs/seaweedfs/weed/replication/sink"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/replication/sink/filersink"
|
"github.com/seaweedfs/seaweedfs/weed/replication/sink/filersink"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/replication/source"
|
"github.com/seaweedfs/seaweedfs/weed/replication/source"
|
||||||
|
"github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/security"
|
"github.com/seaweedfs/seaweedfs/weed/security"
|
||||||
statsCollect "github.com/seaweedfs/seaweedfs/weed/stats"
|
statsCollect "github.com/seaweedfs/seaweedfs/weed/stats"
|
||||||
"github.com/seaweedfs/seaweedfs/weed/util"
|
"github.com/seaweedfs/seaweedfs/weed/util"
|
||||||
|
@ -394,6 +395,10 @@ func genProcessFunction(sourcePath string, targetPath string, excludePaths []str
|
||||||
glog.V(0).Infof("received %v", resp)
|
glog.V(0).Infof("received %v", resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if isMultipartUploadDir(resp.Directory) {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if !strings.HasPrefix(resp.Directory, sourcePath) {
|
if !strings.HasPrefix(resp.Directory, sourcePath) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue