From 7090129f8920ca27d045af437e547528abe05658 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Thu, 6 Apr 2017 17:16:03 +0300 Subject: [PATCH] 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. --- tools/isobuild/builder.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/isobuild/builder.js b/tools/isobuild/builder.js index 2a6e3def3e..f97aa2e401 100644 --- a/tools/isobuild/builder.js +++ b/tools/isobuild/builder.js @@ -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);