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

@ -4,6 +4,8 @@ import (
"fmt"
"strconv"
"time"
"github.com/alist-org/alist/v3/pkg/utils"
)
type ErrResp struct {
@ -147,7 +149,7 @@ type Files struct {
}
func (c *Files) GetSize() int64 { size, _ := strconv.ParseInt(c.Size, 10, 64); return size }
func (c *Files) GetName() string { return c.Name }
func (c *Files) GetName() string { return utils.MappingName(c.Name) }
func (c *Files) ModTime() time.Time { return c.ModifiedTime }
func (c *Files) IsDir() bool { return c.Kind == FOLDER }
func (c *Files) GetID() string { return c.ID }