fixed totp and go mod
This commit is contained in:
parent
ec5a376733
commit
3a3140875e
297 changed files with 52714 additions and 15245 deletions
11
pkg/fs/fs.go
11
pkg/fs/fs.go
|
|
@ -3,6 +3,7 @@ package fs
|
|||
import (
|
||||
"errors"
|
||||
"git.giftfish.de/ston1th/docstore/pkg/core"
|
||||
"git.giftfish.de/ston1th/docstore/pkg/log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
|
|
@ -31,7 +32,15 @@ func NewFilesystem(base string) (fs *Filesystem, err error) {
|
|||
}
|
||||
fi, err := os.Stat(base)
|
||||
if err != nil {
|
||||
return
|
||||
err = os.Mkdir(base, DirMode)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
log.Printf("fs: created data directory '%s'", base)
|
||||
fi, err = os.Stat(base)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
if !fi.IsDir() {
|
||||
err = errors.New("base dir '" + base + "' is not a directory")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue