mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-01-23 02:35:10 +00:00
fix: set correct scope when user home creation is enabled
This commit is contained in:
parent
d1d8e3e340
commit
02730bb9bf
12 changed files with 116 additions and 72 deletions
|
|
@ -92,11 +92,7 @@ func (u *User) Clean(baseScope string, fields ...string) error {
|
|||
|
||||
if u.Fs == nil {
|
||||
scope := u.Scope
|
||||
|
||||
if !filepath.IsAbs(scope) {
|
||||
scope = filepath.Join(baseScope, scope)
|
||||
}
|
||||
|
||||
scope = filepath.Join(baseScope, filepath.Join("/", scope)) //nolint:gocritic
|
||||
u.Fs = afero.NewBasePathFs(afero.NewOsFs(), scope)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue