Permalink
Browse files

creating root folder if missing

this fixes 'no such file or directory' errors when passing zero args

Closes #24
  • Loading branch information...
1 parent ad0ba6f commit d5c7b86c8edde64b02c522a7ff98ca7839eef745 @narkisr narkisr committed with Sep 26, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 main.go
View
@@ -190,6 +190,10 @@ func main() {
mcaddr := flag.String("memcbind", "", "Memcached server bind address")
flag.Parse()
+ if err := os.MkdirAll(*dbRoot, 0777); err != nil {
+ log.Fatalf("Could not create %v: %v", *dbRoot, err)
+ }
+
// Update the query handler deadline to the query timeout
found := false
for i := range routingTable {

0 comments on commit d5c7b86

Please sign in to comment.