We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e2d2e5 commit 9c8012cCopy full SHA for 9c8012c
src/utils.ts
@@ -1,7 +1,7 @@
1
import { existsSync, statSync, writeFileSync } from 'node:fs'
2
3
export function sameFileSize(buffer: Buffer, filePath: string, update: 'all' | 'none' | 'missing'): boolean {
4
- if (!existsSync(filePath) || update === 'all' || update === 'missing') {
+ if (update === 'all' || (!existsSync(filePath) && update === 'missing')) {
5
writeFileSync(filePath, buffer)
6
7
return true
0 commit comments