diff --git a/server/common/common.go b/server/common/common.go index cbebf57c..34028d56 100644 --- a/server/common/common.go +++ b/server/common/common.go @@ -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) { diff --git a/server/webdav/file.go b/server/webdav/file.go index 5a61d421..aee27556 100644 --- a/server/webdav/file.go +++ b/server/webdav/file.go @@ -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 }