fs: treat `std::errc::permission_denied` as `EPERM` error · nodejs/node@2de845b · GitHub
Skip to content

Commit 2de845b

Browse files
PickBasaduh95
authored andcommitted
fs: treat std::errc::permission_denied as EPERM error
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> PR-URL: #64698 Fixes: #64016 Refs: #64017 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
1 parent 83a7949 commit 2de845b

2 files changed

Lines changed: 91 additions & 1 deletion

File tree

src/node_file.cc

Lines changed: 6 additions & 1 deletion
Lines changed: 85 additions & 0 deletions

0 commit comments

Comments
 (0)