Merge commit from fork

This commit is contained in:
Henrique Dias 2025-06-25 17:42:39 +02:00 committed by GitHub
parent 4bfbf33249
commit ca86f91621
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View File

@ -14,6 +14,7 @@ import (
"github.com/spf13/pflag"
yaml "gopkg.in/yaml.v2"
"github.com/filebrowser/filebrowser/v2/files"
"github.com/filebrowser/filebrowser/v2/settings"
"github.com/filebrowser/filebrowser/v2/storage"
"github.com/filebrowser/filebrowser/v2/storage/bolt"
@ -105,7 +106,7 @@ func python(fn pythonFunc, cfg pythonConfig) cobraFunc {
log.Println("Using database: " + absPath)
data.hadDB = exists
db, err := storm.Open(path)
db, err := storm.Open(path, storm.BoltOptions(files.PermFile, nil))
checkErr(err)
defer db.Close()
data.store, err = bolt.NewStorage(db)

View File

@ -27,8 +27,8 @@ import (
"github.com/filebrowser/filebrowser/v2/rules"
)
const PermFile = 0644
const PermDir = 0755
const PermFile = 0640
const PermDir = 0750
var (
reSubDirs = regexp.MustCompile("(?i)^sub(s|titles)$")