rimraf 2.2.5 → 2.2.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/rimraf.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimraf",
3
- "version": "2.2.5",
3
+ "version": "2.2.6",
4
4
  "main": "rimraf.js",
5
5
  "description": "A deep deletion module for node (like `rm -rf`)",
6
6
  "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
package/rimraf.js CHANGED
@@ -110,7 +110,7 @@ function rmdir (p, originalEr, cb) {
110
110
  // if we guessed wrong, and it's not a directory, then
111
111
  // raise the original error.
112
112
  fs.rmdir(p, function (er) {
113
- if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST"))
113
+ if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM"))
114
114
  rmkids(p, cb)
115
115
  else if (er && er.code === "ENOTDIR")
116
116
  cb(originalEr)
@@ -165,7 +165,7 @@ function rmdirSync (p, originalEr) {
165
165
  return
166
166
  if (er.code === "ENOTDIR")
167
167
  throw originalEr
168
- if (er.code === "ENOTEMPTY" || er.code === "EEXIST")
168
+ if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")
169
169
  rmkidsSync(p)
170
170
  }
171
171
  }