Avoid creating filer folder if not starting it.

This commit is contained in:
chrislusf 2015-02-02 16:26:12 -08:00
parent e381356af9
commit 1791de4ae4

View file

@ -140,9 +140,11 @@ func runServer(cmd *Command, args []string) bool {
if *masterMetaFolder == "" { if *masterMetaFolder == "" {
*masterMetaFolder = folders[0] *masterMetaFolder = folders[0]
} }
if *filerOptions.dir == "" { if *isStartingFiler {
*filerOptions.dir = *masterMetaFolder + "/filer" if *filerOptions.dir == "" {
os.MkdirAll(*filerOptions.dir, 0700) *filerOptions.dir = *masterMetaFolder + "/filer"
os.MkdirAll(*filerOptions.dir, 0700)
}
} }
if err := util.TestFolderWritable(*masterMetaFolder); err != nil { if err := util.TestFolderWritable(*masterMetaFolder); err != nil {
glog.Fatalf("Check Meta Folder (-mdir=\"%s\") Writable: %s", *masterMetaFolder, err) glog.Fatalf("Check Meta Folder (-mdir=\"%s\") Writable: %s", *masterMetaFolder, err)