fs: treat std::errc::permission_denied as EPERM error#64698
Open
PickBas wants to merge 2 commits into
Open
Conversation
In the thrown exception, `std::errc::permission_denied` is already treated as an `EPERM` error, but it is not included in one of the omittable errors when retrying the `RmSync` operation. This commit includes it. This also fixes the `retryDelay` calculation on Windows where the `retryDelay` is divided by `1000` but the win32's `Sleep` function takes the argument as an `ms` unit, dividing the supplied `ms` unit further to a much smaller delay. Signed-off-by: louiellan <louie.lou.llaneta@gmail.com>
jasnell
reviewed
Jul 23, 2026
jasnell
reviewed
Jul 23, 2026
jasnell
approved these changes
Jul 23, 2026
PickBas
force-pushed
the
win-rmsync-eperm-retry-test
branch
from
July 23, 2026 13:23
092d380 to
b5441d9
Compare
jasnell
approved these changes
Jul 23, 2026
PickBas
force-pushed
the
win-rmsync-eperm-retry-test
branch
from
July 23, 2026 13:31
b5441d9 to
977185e
Compare
Fixes: nodejs#64016 Signed-off-by: PickBas <sayed.kirill@gmail.com>
PickBas
force-pushed
the
win-rmsync-eperm-retry-test
branch
from
July 23, 2026 13:39
977185e to
7cf7983
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64698 +/- ##
==========================================
- Coverage 92.01% 90.13% -1.89%
==========================================
Files 379 741 +362
Lines 166972 242158 +75186
Branches 25554 45602 +20048
==========================================
+ Hits 153639 218268 +64629
- Misses 13041 15386 +2345
- Partials 292 8504 +8212
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
std::errc::permission_deniedis already treated as anEPERMerror when an exception is thrown, but it is not included among the omittable errors retried by theRmSyncoperation. This commit adds it.This also fixes the
retryDelaycalculation on Windows where theretryDelayis divided by1000but the win32's Sleep function takes the argument as an ms unit, dividing the supplied ms unit further to a much smaller delay.Fixes: #64016
Refs: #64017 - This PR adds a test for the referenced PR.