aboutsummaryrefslogtreecommitdiff
path: root/weed/command
diff options
context:
space:
mode:
Diffstat (limited to 'weed/command')
-rw-r--r--weed/command/filer_remote_sync_dir.go7
-rw-r--r--weed/command/filer_sync.go4
-rw-r--r--weed/command/scaffold.go6
3 files changed, 12 insertions, 5 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+"/")
}
diff --git a/weed/command/filer_sync.go b/weed/command/filer_sync.go
index 20464fa50..292fb0956 100644
--- a/weed/command/filer_sync.go
+++ b/weed/command/filer_sync.go
@@ -394,6 +394,10 @@ func genProcessFunction(sourcePath string, targetPath string, excludePaths []str
glog.V(0).Infof("received %v", resp)
}
+ if isMultipartUploadDir(resp.Directory) {
+ return nil
+ }
+
if !strings.HasPrefix(resp.Directory, sourcePath) {
return nil
}
diff --git a/weed/command/scaffold.go b/weed/command/scaffold.go
index b37254bb5..5d1ccb13f 100644
--- a/weed/command/scaffold.go
+++ b/weed/command/scaffold.go
@@ -21,9 +21,9 @@ var cmdScaffold = &Command{
For example, the filer.toml mysql password can be overwritten by environment variable
export WEED_MYSQL_PASSWORD=some_password
Environment variable rules:
- * Prefix the variable name with "WEED_"
- * Uppercase the reset of variable name.
- * Replace '.' with '_'
+ * Prefix the variable name with "WEED_".
+ * Uppercase the rest of the variable name.
+ * Replace '.' with '_'.
`,
}