🎇 close #522 hide account for guest webdav

pull/548/head
Xhofe 2022-02-11 16:19:55 +08:00
parent 435bdea8f7
commit 6827af3997
1 changed files with 6 additions and 7 deletions

View File

@ -50,18 +50,17 @@ func (fs *FileSystem) File(rawPath string) (*model.File, error) {
func (fs *FileSystem) Files(ctx context.Context, rawPath string) ([]model.File, error) { func (fs *FileSystem) Files(ctx context.Context, rawPath string) ([]model.File, error) {
rawPath = utils.ParsePath(rawPath) rawPath = utils.ParsePath(rawPath)
var files []model.File
var err error
if model.AccountsCount() > 1 && rawPath == "/" { if model.AccountsCount() > 1 && rawPath == "/" {
files, err := model.GetAccountFiles() files, err = model.GetAccountFiles()
if err != nil { } else {
return nil, err
}
return files, nil
}
account, path_, driver, err := common.ParsePath(rawPath) account, path_, driver, err := common.ParsePath(rawPath)
if err != nil { if err != nil {
return nil, err return nil, err
} }
files, err := operate.Files(driver, account, path_) files, err = operate.Files(driver, account, path_)
}
if err != nil { if err != nil {
return nil, err return nil, err
} }