diff --git a/weed-fs/src/cmd/weed/export.go b/weed-fs/src/cmd/weed/export.go index ae9f5f212..27c353b28 100644 --- a/weed-fs/src/cmd/weed/export.go +++ b/weed-fs/src/cmd/weed/export.go @@ -40,6 +40,10 @@ func runExport(cmd *Command, args []string) bool { return false } + if *dest!="" && !strings.HasSuffix(*dest, ".tar") { + fmt.Println("the output file", *dest, "should ends with .tar") + return false + } var err error if strings.HasSuffix(*dest, ".tar") { var fh *os.File