gallery: create DB directory in initialization
So that README.adoc instructions actually work.
This commit is contained in:
parent
19705527a0
commit
beb7c5e337
3
main.go
3
main.go
@ -296,6 +296,9 @@ func cmdInit(fs *flag.FlagSet, args []string) error {
|
|||||||
if fs.NArg() != 1 {
|
if fs.NArg() != 1 {
|
||||||
return errWrongUsage
|
return errWrongUsage
|
||||||
}
|
}
|
||||||
|
if err := os.MkdirAll(fs.Arg(0), 0755); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
if err := openDB(fs.Arg(0)); err != nil {
|
if err := openDB(fs.Arg(0)); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user