diff --git a/src/node_file.cc b/src/node_file.cc index d93f213202ec43..2bbe9fa9a36a31 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -1785,6 +1785,9 @@ static void RmSync(const FunctionCallbackInfo& args) { error == std::errc::too_many_files_open || error == std::errc::too_many_files_open_in_system || error == std::errc::directory_not_empty || + #ifdef _WIN32 + error == std::errc::permission_denied || + #endif error == std::errc::operation_not_permitted); }; @@ -1805,7 +1808,7 @@ static void RmSync(const FunctionCallbackInfo& args) { if (retryDelay > 0) { #ifdef _WIN32 - Sleep(i * retryDelay / 1000); + Sleep(i * retryDelay); #else sleep(i * retryDelay / 1000); #endif