🐛 fix alist root foler invalid

pull/548/head
微凉 2021-12-09 21:56:28 +08:00
parent a295e7024a
commit 6b61f8e9cc
1 changed files with 2 additions and 0 deletions

View File

@ -115,6 +115,8 @@ func (driver Alist) Link(path string, account *model.Account) (*base.Link, error
func (driver Alist) Path(path string, account *model.Account) (*model.File, []model.File, error) { func (driver Alist) Path(path string, account *model.Account) (*model.File, []model.File, error) {
path = utils.ParsePath(path) path = utils.ParsePath(path)
path = filepath.Join(account.RootFolder, path)
path = strings.ReplaceAll(path, "\\", "/")
cache, err := base.GetCache(path, account) cache, err := base.GetCache(path, account)
if err == nil { if err == nil {
files := cache.([]model.File) files := cache.([]model.File)