You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
When running the following under Windows, I sometimes get an EPERM error:
var fs = require("fs")
var fsvacuum = require("fs-vacuum")
var options = {
base : ".",
purge : true
};
function vacuum(path) {
fsvacuum(path, options, function (error) {
if (error) console.error("Cannot remove", path, error)
})
}
fs.mkdirSync("foo")
fs.mkdirSync("foo/bar")
fs.mkdirSync("foo/bar/bax")
fs.mkdirSync("foo/bar/bay")
fs.mkdirSync("foo/bar/baz")
vacuum("foo/bar/bax")
vacuum("foo/bar/bay")
vacuum("foo/bar/baz")
vacuum("foo")
Apparently this can happen under Windows when concurrent lstat, readdir and rmdir operations are blocking each other - I noticed that the error can occur in all of these calls inside the next() function of vacuum.
The rimraf package contains an internal function fixWinEPERM that addresses this issue. Maybe something similar needs to be added to vacuum as well.
The text was updated successfully, but these errors were encountered:
When running the following under Windows, I sometimes get an EPERM error:
Apparently this can happen under Windows when concurrent
lstat
,readdir
andrmdir
operations are blocking each other - I noticed that the error can occur in all of these calls inside thenext()
function ofvacuum
.The rimraf package contains an internal function
fixWinEPERM
that addresses this issue. Maybe something similar needs to be added to vacuum as well.The text was updated successfully, but these errors were encountered: