Comparing version 2.1.2 to 2.1.3
22
index.js
@@ -608,3 +608,12 @@ /* global Bare */ | ||
if (err) return cb(err, err.errno, null) | ||
mkdir(filepath, { mode }, cb) | ||
mkdir(filepath, { mode }, function (err) { | ||
if (err === null) return cb(null, 0, null) | ||
stat(filepath, function (e, st) { | ||
if (e) return cb(e, e.errno, null) | ||
if (st.isDirectory()) return cb(null, 0, null) | ||
cb(err, err.errno, null) | ||
}) | ||
}) | ||
}) | ||
@@ -651,3 +660,12 @@ }) | ||
mkdirResursiveSync(filepath.slice(0, i), { mode }) | ||
mkdirSync(filepath, { mode }) | ||
try { | ||
mkdirSync(filepath, { mode }) | ||
} catch (err) { | ||
if (statSync(filepath).isDirectory()) { | ||
return | ||
} | ||
throw err | ||
} | ||
} | ||
@@ -654,0 +672,0 @@ } |
{ | ||
"name": "bare-fs", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "Native file system for Javascript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
408889
1486