rimraf 2.1.3 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rimraf.js +2 -2
package/package.json
CHANGED
package/rimraf.js
CHANGED
|
@@ -69,11 +69,11 @@ function rimraf_ (p, cb) {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
function rmdir (p, originalEr, cb) {
|
|
72
|
-
// try to rmdir first, and only readdir on ENOTEMPTY
|
|
72
|
+
// try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS)
|
|
73
73
|
// if we guessed wrong, and it's not a directory, then
|
|
74
74
|
// raise the original error.
|
|
75
75
|
fs.rmdir(p, function (er) {
|
|
76
|
-
if (er && er.code === "ENOTEMPTY")
|
|
76
|
+
if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST"))
|
|
77
77
|
rmkids(p, cb)
|
|
78
78
|
else if (er && er.code === "ENOTDIR")
|
|
79
79
|
cb(originalEr)
|