aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2018-12-23 18:20:11 -0800
committerChris Lu <chris.lu@gmail.com>2018-12-23 18:20:11 -0800
commitba923e2864da7aae864a4a3d9185212092339142 (patch)
treebce725cd0e6608f0b929f93b1718f2f11cf5ba57
parent332668a3fdf8debe0bfbbbc1c49d3371bfd1749a (diff)
downloadseaweedfs-ba923e2864da7aae864a4a3d9185212092339142.tar.xz
seaweedfs-ba923e2864da7aae864a4a3d9185212092339142.zip
error if the last arguement does not end with forward slash
-rw-r--r--weed/command/filer_copy.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/weed/command/filer_copy.go b/weed/command/filer_copy.go
index 46bf61383..2d318bc1a 100644
--- a/weed/command/filer_copy.go
+++ b/weed/command/filer_copy.go
@@ -80,7 +80,8 @@ func runCopy(cmd *Command, args []string) bool {
}
urlPath := filerUrl.Path
if !strings.HasSuffix(urlPath, "/") {
- urlPath = urlPath + "/"
+ fmt.Printf("The last argument should be a folder and end with \"/\": %v\n", err)
+ return false
}
if filerUrl.Port() == "" {