From 1791de4ae48708dde5104cd2c12c9c321461431f Mon Sep 17 00:00:00 2001 From: chrislusf Date: Mon, 2 Feb 2015 16:26:12 -0800 Subject: [PATCH] Avoid creating filer folder if not starting it. --- go/weed/server.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/go/weed/server.go b/go/weed/server.go index f7cbab55b..b779033cb 100644 --- a/go/weed/server.go +++ b/go/weed/server.go @@ -140,9 +140,11 @@ func runServer(cmd *Command, args []string) bool { if *masterMetaFolder == "" { *masterMetaFolder = folders[0] } - if *filerOptions.dir == "" { - *filerOptions.dir = *masterMetaFolder + "/filer" - os.MkdirAll(*filerOptions.dir, 0700) + if *isStartingFiler { + if *filerOptions.dir == "" { + *filerOptions.dir = *masterMetaFolder + "/filer" + os.MkdirAll(*filerOptions.dir, 0700) + } } if err := util.TestFolderWritable(*masterMetaFolder); err != nil { glog.Fatalf("Check Meta Folder (-mdir=\"%s\") Writable: %s", *masterMetaFolder, err)