Skip to content

Commit

Permalink
[fix] resolves handling busy files
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Solano committed Oct 26, 2020
1 parent d27d0e2 commit 375a203
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/temp.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function cleanupFilesSync() {
var count = 0;
var toDelete;
while ((toDelete = filesToDelete.shift()) !== undefined) {
rimrafSync(toDelete);
rimrafSync(toDelete, { maxBusyTries: 6 });
count++;
}
return count;
Expand Down Expand Up @@ -165,7 +165,7 @@ function cleanupFiles(callback) {
}
};
while ((toDelete = filesToDelete.shift()) !== undefined) {
rimraf(toDelete, rimrafCallback);
rimraf(toDelete, { maxBusyTries: 6 }, rimrafCallback);
}
return promise;
}
Expand All @@ -177,7 +177,7 @@ function cleanupDirsSync() {
var count = 0;
var toDelete;
while ((toDelete = dirsToDelete.shift()) !== undefined) {
rimrafSync(toDelete);
rimrafSync(toDelete, { maxBusyTries: 6 });
count++;
}
return count;
Expand Down Expand Up @@ -219,7 +219,7 @@ function cleanupDirs(callback) {
}
};
while ((toDelete = dirsToDelete.shift()) !== undefined) {
rimraf(toDelete, rimrafCallback);
rimraf(toDelete, { maxBusyTries: 6 }, rimrafCallback);
}
return promise;
}
Expand Down

0 comments on commit 375a203

Please sign in to comment.