diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2024-12-08 22:09:11 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2024-12-08 22:09:11 +0100 |
commit | beb7c5e33747432f9d4d8b99838e752eb5fa6871 (patch) | |
tree | dfbaf544e810d4c0995fe3b0cfe90a637d5d0ed7 /main.go | |
parent | 19705527a0b24236af12e279f4e184bac174ba68 (diff) | |
download | gallery-beb7c5e33747432f9d4d8b99838e752eb5fa6871.tar.gz gallery-beb7c5e33747432f9d4d8b99838e752eb5fa6871.tar.xz gallery-beb7c5e33747432f9d4d8b99838e752eb5fa6871.zip |
gallery: create DB directory in initialization
So that README.adoc instructions actually work.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 } |