🔨 change path

This commit is contained in:
微凉
2021-10-28 12:37:31 +08:00
parent 55f683b12d
commit 98f7dffed9
5 changed files with 51 additions and 26 deletions

View File

@ -27,12 +27,12 @@ func ParsePath(rawPath string) (*model.Account,string,drivers.Driver,error) {
break
default:
paths := strings.Split(rawPath,"/")
path = strings.Join(paths[1:],"/")
name = paths[0]
path = strings.Join(paths[2:],"/")
name = paths[1]
}
account,ok := model.GetAccount(name)
if !ok {
return nil,"",nil,fmt.Errorf("")
return nil,"",nil,fmt.Errorf("no [%s] account", name)
}
driver,ok := drivers.GetDriver(account.Type)
if !ok {