File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2031,14 +2031,15 @@ namespace vcpkg
20312031 {
20322032 this ->rename (old_path, new_path, ec);
20332033 using namespace std ::chrono_literals;
2034+ std::error_code local_ec;
20342035 for (const auto & delay : {10ms, 100ms, 1000ms, 10000ms})
20352036 {
20362037 if (!ec)
20372038 {
20382039 return true ;
20392040 }
20402041 else if (ec == std::make_error_condition (std::errc::directory_not_empty) ||
2041- ec == std::make_error_condition (std::errc::file_exists) || this ->exists (new_path, ec ))
2042+ ec == std::make_error_condition (std::errc::file_exists) || this ->exists (new_path, local_ec ))
20422043 {
20432044 // either the rename failed with a target already exists error, or the target explicitly exists,
20442045 // assume another process 'won' the 'CAS'.
You can’t perform that action at this time.
0 commit comments