mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Re-implement renameDirAlmostAtomically in Builder#complete.
The `rename` is not sufficient on its own since it won't pave the way for the new directory by ensuring that it's empty first. `renameDirAlmostAtomically` will do that.
This commit is contained in:
@@ -688,7 +688,7 @@ Previous builder: ${previousBuilder.outputPath}, this builder: ${outputPath}`
|
||||
// be checked in to version control, but here we could get away with it.
|
||||
if (this.buildPath !== this.outputPath) {
|
||||
try {
|
||||
files.rename(this.buildPath, this.outputPath);
|
||||
files.renameDirAlmostAtomically(this.buildPath, this.outputPath);
|
||||
} catch (e) {
|
||||
if (e.code === "EXDEV") {
|
||||
files.rm_recursive(this.outputPath);
|
||||
|
||||
Reference in New Issue
Block a user