Skip to content

Commit 920a459

Browse files
committed
Fixes requirejs#86, builds on windows failing with node 0.6.8.
1 parent 274a660 commit 920a459

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build/jslib/node/file.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
define(['fs', 'path'], function (fs, path) {
1111

1212
var isWindows = process.platform === 'win32',
13+
windowsDriveRegExp = /^[a-zA-Z]\:\/$/,
1314
file;
1415

1516
function frontSlash(path) {
@@ -31,7 +32,7 @@ define(['fs', 'path'], function (fs, path) {
3132
}
3233

3334
function mkDir(dir) {
34-
if (!exists(dir)) {
35+
if (!exists(dir) && (!isWindows || !windowsDriveRegExp.test(dir))) {
3536
fs.mkdirSync(dir, 511);
3637
}
3738
}

0 commit comments

Comments
 (0)