Update src/main/services/ScreenshotService.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
SuYao 2025-12-15 02:10:32 +08:00 committed by GitHub
parent 1ad083511a
commit 8a9ce2d8d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -59,7 +59,7 @@ export class Screenshot {
const buffer = await image.toPng()
const ext = '.png'
const tempFilePath = await fileStorage.createTempFile({} as any, fileName || `screenshot${ext}`)
const tempFilePath = await fileStorage.createTempFile(undefined, fileName || `screenshot${ext}`)
await fs.promises.writeFile(tempFilePath, buffer)
const stats = await fs.promises.stat(tempFilePath)