gallery: create DB directory in initialization

So that README.adoc instructions actually work.
This commit is contained in:
Přemysl Eric Janouch 2024-12-08 22:09:11 +01:00
parent 19705527a0
commit beb7c5e337
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -296,6 +296,9 @@ func cmdInit(fs *flag.FlagSet, args []string) error {
if fs.NArg() != 1 {
return errWrongUsage
}
if err := os.MkdirAll(fs.Arg(0), 0755); err != nil {
return err
}
if err := openDB(fs.Arg(0)); err != nil {
return err
}