Skip to content

Commit 9c8012c

Browse files
committed
fix: Fixed PDFs always being written
1 parent 7e2d2e5 commit 9c8012c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { existsSync, statSync, writeFileSync } from 'node:fs'
22

33
export function sameFileSize(buffer: Buffer, filePath: string, update: 'all' | 'none' | 'missing'): boolean {
4-
if (!existsSync(filePath) || update === 'all' || update === 'missing') {
4+
if (update === 'all' || (!existsSync(filePath) && update === 'missing')) {
55
writeFileSync(filePath, buffer)
66

77
return true

0 commit comments

Comments
 (0)