Skip to content

Commit

Permalink
Fix extracting to UNC paths
Browse files Browse the repository at this point in the history
Node-7z extractFull was failing to extract to UNC paths (e.g. //somemachine/somepath)

The path.normalize call was taking in a string such as "-o//somemachine/somepath" and converting it to "-o/somemachine/somepath"
Stripping off the -o prior to normalisation and then adding it back in fixes the problem.
  • Loading branch information
ciaranj authored Aug 4, 2017
1 parent 0eec772 commit a335049
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module.exports = function (command, switches) {
o = o.replace(/\//, path.sep);
o = o.replace(/\\/, path.sep);
o = o.replace(/"/g, '');
o = path.normalize(o);
o = "-o" + path.normalize(o.slice(2));
args.push(o);
}

Expand Down

0 comments on commit a335049

Please sign in to comment.