From 030dde227a9b2f5e9cf029c43db3741cf70222ce Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 20 Jan 2013 20:01:59 -0800 Subject: [PATCH] promptive error message --- weed-fs/src/cmd/weed/export.go | 4 ++++ 1 file changed, 4 insertions(+) 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