Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
lib: handle ENFILE error from fs.rmdir()
Fixes: #30482
  • Loading branch information
thangktran committed Nov 15, 2019
commit 0d2c1409fcc444bb1de915ef849a6e39ea8ad307
3 changes: 2 additions & 1 deletion lib/internal/fs/rimraf.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ function rimraf(path, options, callback) {
return setTimeout(_rimraf, busyTries * 100, path, options, CB);
}

if (err.code === 'EMFILE' && timeout < options.emfileWait)
if ((err.code === 'EMFILE' || err.code === 'ENFILE') &&
timeout < options.emfileWait)
return setTimeout(_rimraf, timeout++, path, options, CB);

// The file is already gone.
Expand Down