fix: mapping filename in GetName

some missed filename mapping
This commit is contained in:
Noah Hsu
2022-11-30 20:46:54 +08:00
parent d94cf72da2
commit 83644dab85
11 changed files with 33 additions and 25 deletions

View File

@ -8,7 +8,6 @@ import (
"time"
"github.com/Xhofe/go-cache"
"github.com/alist-org/alist/v3/internal/conf"
"github.com/alist-org/alist/v3/internal/driver"
"github.com/alist-org/alist/v3/internal/errs"
"github.com/alist-org/alist/v3/internal/model"
@ -129,7 +128,7 @@ func Get(ctx context.Context, storage driver.Driver, path string) (model.Obj, er
}
for _, f := range files {
// TODO maybe copy obj here
if utils.MappingName(f.GetName(), conf.FilenameCharMap) == name {
if f.GetName() == name {
// use path as id, why don't set id in List function?
// because files maybe cache, set id here can reduce memory usage
if f.GetPath() == "" {