fix(aklive2d): fixed an issue on naming in downloader

This commit is contained in:
Haoyu Xu
2023-06-24 09:23:03 -04:00
parent 575197e7aa
commit 6155f59996

View File

@@ -11,8 +11,8 @@ export default class Downloader {
const lastCommit = historyData[0]
const lastCommitDate = new Date(lastCommit.commit.committer.date)
console.log(`Last commit date: ${lastCommitDate.getTime()}`)
const basename = path.basename(filepath)
const ext = path.extname(filepath)
const basename = path.basename(filepath).replace(ext, '')
filepath = path.join(filepath, "..", `${basename}_${lastCommitDate.getTime()}${ext}`)
if (exists(filepath)) {