Commit cf2bce6 1 parent db594d0 commit cf2bce6 Copy full SHA for cf2bce6
File tree 1 file changed +6
-3
lines changed
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) {
1654
1654
error == std::errc::operation_not_permitted);
1655
1655
};
1656
1656
1657
+ int i = 1 ;
1658
+
1657
1659
while (maxRetries >= 0 ) {
1658
1660
if (recursive) {
1659
1661
std::filesystem::remove_all (file_path, error);
@@ -1667,14 +1669,15 @@ static void RmSync(const FunctionCallbackInfo<Value>& args) {
1667
1669
break ;
1668
1670
}
1669
1671
1670
- if (retryDelay != 0 ) {
1672
+ if (retryDelay > 0 ) {
1671
1673
#ifdef _WIN32
1672
- Sleep (retryDelay / 1000 );
1674
+ Sleep (i * retryDelay / 1000 );
1673
1675
#else
1674
- sleep (retryDelay / 1000 );
1676
+ sleep (i * retryDelay / 1000 );
1675
1677
#endif
1676
1678
}
1677
1679
maxRetries--;
1680
+ i++;
1678
1681
}
1679
1682
1680
1683
// 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