web upload

This commit is contained in:
微凉
2021-12-31 20:33:39 +08:00
parent cc217df924
commit 103e049f22
5 changed files with 96 additions and 16 deletions

View File

@ -1,6 +1,7 @@
package common
import (
"errors"
"fmt"
"github.com/Xhofe/alist/drivers/base"
"github.com/Xhofe/alist/model"
@ -29,6 +30,9 @@ func ParsePath(rawPath string) (*model.Account, string, base.Driver, error) {
path = rawPath
break
default:
if path == "/" {
return nil, "", nil, errors.New("can't operate root of multiple accounts")
}
paths := strings.Split(rawPath, "/")
path = "/" + strings.Join(paths[2:], "/")
name = paths[1]