From 55c5eb00dc12c5e566a191e7f9a1935d560cdbe1 Mon Sep 17 00:00:00 2001 From: RyanZim Date: Thu, 16 Mar 2017 13:27:33 -0400 Subject: [PATCH] Prevent callback from being called twice Fixes #392 --- lib/remove/rimraf.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/remove/rimraf.js b/lib/remove/rimraf.js index 42eefe52..141a82d2 100644 --- a/lib/remove/rimraf.js +++ b/lib/remove/rimraf.js @@ -83,7 +83,7 @@ function rimraf_ (p, options, cb) { // Windows can EPERM on stat. Life is suffering. if (er && er.code === 'EPERM' && isWindows) { - fixWinEPERM(p, options, er, cb) + return fixWinEPERM(p, options, er, cb) } if (st && st.isDirectory()) {