Created
April 23, 2019 19:19
-
-
Save isaacs/1e9a9f29ad232c88402455119fac59bc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/writer.js b/lib/writer.js | |
index 140e449..3f10547 100644 | |
--- a/lib/writer.js | |
+++ b/lib/writer.js | |
@@ -147,7 +147,7 @@ Writer.prototype._stat = function (current) { | |
// if it's a type change, then we need to clobber or error. | |
// if it's not a type change, then let the impl take care of it. | |
- if (currentType !== self.type) { | |
+ if (currentType !== self.type || self.type === 'File' && current.nlink > 1) { | |
return rimraf(self._path, function (er) { | |
if (er) return self.error(er) | |
self._old = null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment