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 eed1d8f commit d519966Copy full SHA for d519966
src/generators/legacy-html/utils/safeCopy.mjs
@@ -19,16 +19,13 @@ export async function safeCopy(srcDir, targetDir) {
19
20
const tStat = await stat(targetPath).catch(() => undefined);
21
22
- // If target doesn't exist, copy immediately
23
- if (!tStat) {
+ if (tStat === undefined) {
24
await copyFile(sourcePath, targetPath);
25
continue;
26
}
27
28
- // Target exists, check if we need to update
29
const sStat = await stat(sourcePath);
30
31
- // Skip if target has same size and source is not newer
32
if (sStat.size !== tStat.size || sStat.mtimeMs > tStat.mtimeMs) {
33
34
0 commit comments