refactor: 优化临时文件命名以提高一致性
All checks were successful
Build Server / Compile DLL (push) Successful in 3m56s

- 优化临时文件命名后缀以提高一致性和通用性。
This commit is contained in:
2025-07-08 01:21:49 +08:00
parent 721bd2bb5c
commit 79e1da12e8

View File

@@ -65,7 +65,7 @@ export class WechatOCRClient {
}
public async recognize(image: Buffer): Promise<string> {
const tempPath = join(tmpdir(), `wechat-ocr-temp-${randomBytes(16).toString('hex')}.png`)
const tempPath = join(tmpdir(), `wechat-ocr-${randomBytes(16).toString('hex')}.tmp`)
await writeFile(tempPath, image)
try {