You've already forked filebrowser
mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-11-26 14:25:26 +08:00
build: refactor makefile
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"errors"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -50,8 +51,8 @@ func (s *Settings) MakeUserDir(username, userScope, serverRoot string) (string,
|
||||
}
|
||||
|
||||
// Create default user dir
|
||||
userHomeBase := s.Defaults.Scope + string(os.PathSeparator) + "users"
|
||||
userHome := userHomeBase + string(os.PathSeparator) + username
|
||||
userHomeBase := filepath.Join(s.Defaults.Scope, "users")
|
||||
userHome := filepath.Join(userHomeBase, username)
|
||||
err = fs.MkdirAll(userHome, os.ModePerm)
|
||||
if err != nil {
|
||||
log.Printf("create user: failed to mkdir user home dir: [%s]", userHome)
|
||||
|
||||
Reference in New Issue
Block a user