File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -1654,6 +1654,8 @@ static void RmSync(const FunctionCallbackInfo<Value>& args) {
16541654 error == std::errc::operation_not_permitted);
16551655 };
16561656
1657+ int i = 1 ;
1658+
16571659 while (maxRetries >= 0 ) {
16581660 if (recursive) {
16591661 std::filesystem::remove_all (file_path, error);
@@ -1667,14 +1669,15 @@ static void RmSync(const FunctionCallbackInfo<Value>& args) {
16671669 break ;
16681670 }
16691671
1670- if (retryDelay != 0 ) {
1672+ if (retryDelay > 0 ) {
16711673#ifdef _WIN32
1672- Sleep (retryDelay / 1000 );
1674+ Sleep (i * retryDelay / 1000 );
16731675#else
1674- sleep (retryDelay / 1000 );
1676+ sleep (i * retryDelay / 1000 );
16751677#endif
16761678 }
16771679 maxRetries--;
1680+ i++;
16781681 }
16791682
16801683 // On Windows path::c_str() returns wide char, convert to std::string first.
You can’t perform that action at this time.
0 commit comments