:BUG: 修复获取文件扩展名的错误

This commit is contained in:
eatmoreapple 2021-12-03 11:24:40 +08:00
parent 396a4f2343
commit b8940243d0

View File

@ -68,7 +68,7 @@ func getFileExt(name string) string {
if len(ext) == 0 { if len(ext) == 0 {
ext = "undefined" ext = "undefined"
} }
return strings.TrimSuffix(ext, ".") return strings.TrimPrefix(ext, ".")
} }
const ( const (