Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 6a77d2f

Browse files
committed
Clobber a Link if it's in the way of a File
Fixes isaacs/node-tar#212
1 parent 1e4527f commit 6a77d2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lib/writer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Writer.prototype._stat = function (current) {
147147

148148
// if it's a type change, then we need to clobber or error.
149149
// if it's not a type change, then let the impl take care of it.
150-
if (currentType !== self.type) {
150+
if (currentType !== self.type || self.type === 'File' && current.nlink > 1) {
151151
return rimraf(self._path, function (er) {
152152
if (er) return self.error(er)
153153
self._old = null

0 commit comments

Comments
 (0)