From 84be430b7030c9ca479265dfc55f8fa90738876a Mon Sep 17 00:00:00 2001 From: Kuingsmile Date: Mon, 25 Nov 2024 17:30:01 +0800 Subject: [PATCH] :bug: Fix(custom): fix auto name bug --- package.json | 2 +- src/main/apis/app/uploader/index.ts | 4 ++-- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 70cdc0a..bbbf7ad 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "multer": "^1.4.5-lts.1", "node-ssh-no-cpu-features": "^2.0.0", "nodejs-file-downloader": "^4.12.1", - "piclist": "^1.9.7", + "piclist": "^1.9.8", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", "proxy-agent": "^5.0.0", diff --git a/src/main/apis/app/uploader/index.ts b/src/main/apis/app/uploader/index.ts index eeb8ccf..064f073 100644 --- a/src/main/apis/app/uploader/index.ts +++ b/src/main/apis/app/uploader/index.ts @@ -84,7 +84,7 @@ class Uploader { ctx.output.map(async (item, index) => { let name: undefined | string | null const fileName = autoRename - ? `${dayjs().add(index, 'ms').format('YYYYMMDDHHmmSSS')}${item.extname}` + ? `${dayjs().add(index, 'ms').format('YYYYMMDDHHmmssSSS')}${item.extname}` : item.fileName if (rename) { const window = windowManager.create(IWindowList.RENAME_WINDOW)! @@ -122,7 +122,7 @@ class Uploader { const buffer = nativeImage.toPNG() const baseDir = picgo.baseDir - const fileName = `${dayjs().format('YYYYMMDDHHmmSSS')}.png` + const fileName = `${dayjs().format('YYYYMMDDHHmmssSSS')}.png` const filePath = path.join(baseDir, CLIPBOARD_IMAGE_FOLDER, fileName) await writeFile(filePath, buffer) return filePath diff --git a/yarn.lock b/yarn.lock index 872b10e..ab22a3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11956,10 +11956,10 @@ performance-now@^2.1.0: resolved "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== -piclist@^1.9.7: - version "1.9.7" - resolved "https://registry.yarnpkg.com/piclist/-/piclist-1.9.7.tgz#f34714248c8b72b009626fd7feaa25ac663a0bb4" - integrity sha512-52cRCmGZx3jK9unzK4CAmgzIhOOYrfI71wvdigXjNnWGwfVjhxgWj8UkTLSZ9zPRJXzrOLmJvck30UhWUElBsg== +piclist@^1.9.8: + version "1.9.8" + resolved "https://registry.yarnpkg.com/piclist/-/piclist-1.9.8.tgz#09eaa51a2c71a0a1db0b2d48feed6c99caf796e2" + integrity sha512-tti3aMsv0/x/UjVCAwvJ+IAPwjH205qUmu4gK/IoSHHR7rV+CVn4dFFcGLSiBasyv0UYm2SlTTRgG4q9Ri2V2w== dependencies: "@aws-sdk/client-s3" "3.421.0" "@aws-sdk/lib-storage" "3.421.0"