Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2016-07-08 00:55:59 +0300
committerRebecca Turner <me@re-becca.org>2016-07-08 00:56:00 +0300
commit22802c9db3cf990c905e8f61304db9b5571d7964 (patch)
treecc05dd3ab3283cfa4400731fd4e960f71f5f8928 /node_modules/rimraf/rimraf.js
parentc7567e58618b63f97884afa104d2f560c9272dd5 (diff)
rimraf@2.5.3
Dependency updates. Fixes EPERM errors when lstating RO dirs. Fixes: https://github.com/isaacs/rimraf/issues/105 Credit: @isaacs
Diffstat (limited to 'node_modules/rimraf/rimraf.js')
-rw-r--r--node_modules/rimraf/rimraf.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/node_modules/rimraf/rimraf.js b/node_modules/rimraf/rimraf.js
index c01d13b20..db518a9d6 100644
--- a/node_modules/rimraf/rimraf.js
+++ b/node_modules/rimraf/rimraf.js
@@ -61,7 +61,7 @@ function rimraf (p, options, cb) {
if (options.disableGlob || !glob.hasMagic(p))
return afterGlob(null, [p])
- fs.lstat(p, function (er, stat) {
+ options.lstat(p, function (er, stat) {
if (!er)
return afterGlob(null, [p])
@@ -135,6 +135,10 @@ function rimraf_ (p, options, cb) {
if (er && er.code === "ENOENT")
return cb(null)
+ // Windows can EPERM on stat. Life is suffering.
+ if (er && er.code === "EPERM" && isWindows)
+ fixWinEPERM(p, options, er, cb)
+
if (st && st.isDirectory())
return rmdir(p, options, er, cb)
@@ -269,7 +273,7 @@ function rimrafSync (p, options) {
results = [p]
} else {
try {
- fs.lstatSync(p)
+ options.lstatSync(p)
results = [p]
} catch (er) {
results = glob.sync(p, options.glob)
@@ -287,6 +291,10 @@ function rimrafSync (p, options) {
} catch (er) {
if (er.code === "ENOENT")
return
+
+ // Windows can EPERM on stat. Life is suffering.
+ if (er.code === "EPERM" && isWindows)
+ fixWinEPERMSync(p, options, er)
}
try {