avoid unnecessary error message

fix https://github.com/chrislusf/seaweedfs/issues/1611
This commit is contained in:
Chris Lu 2020-11-11 13:00:05 -08:00
parent a29abd8600
commit 745ee8d8f3

View file

@ -122,7 +122,7 @@ func runCopy(cmd *Command, args []string) bool {
expectedBucket := restPath[:strings.Index(restPath, "/")]
if *copy.collection == "" {
*copy.collection = expectedBucket
} else {
} else if *copy.collection != expectedBucket {
fmt.Printf("destination %s uses collection \"%s\": unexpected collection \"%v\"\n", urlPath, expectedBucket, *copy.collection)
return true
}