Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

Commit f718c04

Browse files
committed
Merge pull request #19 from sebakerckhof/master
Convert colons on windows.
2 parents 75c8b68 + 981179e commit f718c04

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var echo = function(name) {
1414
}
1515

1616
var normalize = !win32 ? echo : function(name) {
17-
return name.replace(/\\/g, '/')
17+
return name.replace(/\\/g, '/').replace(/:/g, '_');
1818
}
1919

2020
var statAll = function(fs, stat, cwd, ignore, entries) {
@@ -202,6 +202,8 @@ exports.extract = function(cwd, opts) {
202202

203203
extract.on('entry', function(header, stream, next) {
204204
header = map(header) || header
205+
206+
header.name = normalize(header.name);
205207
var name = path.join(cwd, path.join('/', header.name))
206208

207209
if (ignore(name)) {

0 commit comments

Comments
 (0)