fix(webdav): alist path not found

pull/884/head
Xhofe 2022-04-01 20:40:57 +08:00
parent e83081380e
commit df90311453
2 changed files with 5 additions and 4 deletions

View File

@ -38,10 +38,10 @@ func ParsePath(rawPath string) (*model.Account, string, base.Driver, error) {
if bIndex != -1 {
name = name[:bIndex]
}
if name == "/" {
name = ""
}
return &account, strings.TrimPrefix(rawPath, name), driver, nil
//if name == "/" {
// name = ""
//}
return &account, utils.ParsePath(strings.TrimPrefix(rawPath, name)), driver, nil
}
func ErrorResp(c *gin.Context, err error, code int) {

View File

@ -42,6 +42,7 @@ func (fs *FileSystem) File(rawPath string) (*model.File, error) {
}, nil
}
account, path_, driver, err := common.ParsePath(rawPath)
log.Debugln(account, path_, driver, err)
if err != nil {
return nil, err
}