From 911e4921e2ec19cfbda19c08389832874b39ac2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Thu, 12 Sep 2024 18:15:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E6=97=A7=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/apis/file.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/apis/file.ts b/src/core/apis/file.ts index 1c00a8df..07b1537d 100644 --- a/src/core/apis/file.ts +++ b/src/core/apis/file.ts @@ -148,7 +148,8 @@ export class NTQQFileApi { logger.logError('获取视频信息失败,将使用默认值', e); } const newFilePath = filePath + '.mp4'; - fs.renameSync(filePath, newFilePath); + fs.copyFileSync(filePath, newFilePath); + context.deleteAfterSentFiles.push(newFilePath); filePath = newFilePath; const { fileName: _fileName, path, fileSize, md5 } = await this.core.apis.FileApi.uploadFile(filePath, ElementType.VIDEO); if (fileSize === 0) {