Skip to content

Commit c5fca95

Browse files
authored
Merge pull request #8 from evgo2017/reName-extname
fix: remove extname from reName(移除在重命名文件时增加后缀)
2 parents bf7677e + b359738 commit c5fca95

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/utils/reName.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ import * as path from 'path'
33

44
export function reName(nameType: string, url: string): string {
55
const fileName = path.basename(url)
6-
const extname = path.extname(url)
76
switch (nameType) {
87
case NameType.timestamp:
9-
return `${Date.now()}${extname}`
8+
return `${Date.now()}$`
109
case NameType.none:
1110
default:
12-
return `${fileName}${extname}`
11+
return `${fileName}$`
1312
}
1413
}

0 commit comments

Comments
 (0)