From 09f98630c0412ec2c80cd05c020508d36bef226a Mon Sep 17 00:00:00 2001 From: chrislusf Date: Thu, 5 Feb 2015 10:12:35 -0800 Subject: [PATCH] Avoid checking folder if not using filer. fix #80 Fix https://github.com/chrislusf/weed-fs/issues/80 --- go/weed/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/go/weed/server.go b/go/weed/server.go index b779033cb..eeda57b96 100644 --- a/go/weed/server.go +++ b/go/weed/server.go @@ -145,13 +145,13 @@ func runServer(cmd *Command, args []string) bool { *filerOptions.dir = *masterMetaFolder + "/filer" os.MkdirAll(*filerOptions.dir, 0700) } + if err := util.TestFolderWritable(*filerOptions.dir); err != nil { + glog.Fatalf("Check Mapping Meta Folder (-filer.dir=\"%s\") Writable: %s", *filerOptions.dir, err) + } } if err := util.TestFolderWritable(*masterMetaFolder); err != nil { glog.Fatalf("Check Meta Folder (-mdir=\"%s\") Writable: %s", *masterMetaFolder, err) } - if err := util.TestFolderWritable(*filerOptions.dir); err != nil { - glog.Fatalf("Check Mapping Meta Folder (-filer.dir=\"%s\") Writable: %s", *filerOptions.dir, err) - } if *serverWhiteListOption != "" { serverWhiteList = strings.Split(*serverWhiteListOption, ",")