From beb7c5e33747432f9d4d8b99838e752eb5fa6871 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Sun, 8 Dec 2024 22:09:11 +0100 Subject: gallery: create DB directory in initialization So that README.adoc instructions actually work. --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index c4f222e..23087c0 100644 --- a/main.go +++ b/main.go @@ -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 } -- cgit v1.2.3-70-g09d2