Skip to content

Commit

Permalink
win32 rename EBUSY: retry
Browse files Browse the repository at this point in the history
when rename fails with EBUSY we should also retry like we do with EPERM and EACCESS

behaviour is consistent with rm (https://github.com/isaacs/rimraf)

resolves isaacs#127
  • Loading branch information
conceptualspace committed May 2, 2018
1 parent bc5e68e commit 41b336e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion polyfills.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function patch (fs) {
var backoff = 0;
fs$rename(from, to, function CB (er) {
if (er
&& (er.code === "EACCES" || er.code === "EPERM")
&& (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY")
&& Date.now() - start < 60000) {
setTimeout(function() {
fs.stat(to, function (stater, st) {
Expand Down

0 comments on commit 41b336e

Please sign in to comment.