mirror of https://github.com/Xhofe/alist
fix(webdav): alist path not found
parent
e83081380e
commit
df90311453
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue