Skip to content

Commit a346793

Browse files
committed
fix bad directory relocation fallback code
1 parent 0b42ad8 commit a346793

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/command/render/project.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ export async function renderProject(
513513
// because src and target are in different file systems.
514514
// In that case, try to recursively copy from src
515515
copyTo(srcDir, targetDir);
516-
safeRemoveDirSync(targetDir, context.dir);
516+
safeRemoveDirSync(srcDir, context.dir);
517517
}
518518
}
519519
};
@@ -632,13 +632,11 @@ export async function renderProject(
632632
const sortedOperations = uniqOps.sort((a, b) => {
633633
if (a.src === b.src) {
634634
return 0;
635-
} else {
636-
if (isSubdir(a.src, b.src)) {
637-
return -1;
638-
} else {
639-
return a.src.localeCompare(b.src);
640-
}
641635
}
636+
if (isSubdir(a.src, b.src)) {
637+
return -1;
638+
}
639+
return a.src.localeCompare(b.src);
642640
});
643641

644642
// Before file move

0 commit comments

Comments
 (0)