feat: add root prefix before operate

This commit is contained in:
Noah Hsu
2022-06-10 20:20:45 +08:00
parent 354dee67dc
commit cd7e9974df
9 changed files with 49 additions and 11 deletions

View File

@ -11,7 +11,6 @@ import (
// List files
// TODO: hide
// TODO: sort
// TODO: cache, and prevent cache breakdown
func List(ctx context.Context, path string) ([]driver.FileInfo, error) {
account, actualPath, err := operations.GetAccountAndActualPath(path)
virtualFiles := operations.GetAccountVirtualFilesByPath(path)
@ -21,7 +20,7 @@ func List(ctx context.Context, path string) ([]driver.FileInfo, error) {
}
return nil, errors.WithMessage(err, "failed get account")
}
files, err := account.List(ctx, actualPath)
files, err := operations.List(ctx, account, actualPath)
if err != nil {
log.Errorf("%+v", err)
if len(virtualFiles) != 0 {