mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-06 14:19:59 -05:00
parent
fa8409e760
commit
fa5844f06d
1 changed files with 0 additions and 11 deletions
|
@ -249,20 +249,9 @@ fs::path GetSpecialFolderPath(int nFolder, bool fCreate)
|
||||||
|
|
||||||
bool RenameOver(fs::path src, fs::path dest)
|
bool RenameOver(fs::path src, fs::path dest)
|
||||||
{
|
{
|
||||||
#ifdef __MINGW64__
|
|
||||||
// This is a workaround for a bug in libstdc++ which
|
|
||||||
// implements fs::rename with _wrename function.
|
|
||||||
// This bug has been fixed in upstream:
|
|
||||||
// - GCC 10.3: 8dd1c1085587c9f8a21bb5e588dfe1e8cdbba79e
|
|
||||||
// - GCC 11.1: 1dfd95f0a0ca1d9e6cbc00e6cbfd1fa20a98f312
|
|
||||||
// For more details see the commits mentioned above.
|
|
||||||
return MoveFileExW(src.wstring().c_str(), dest.wstring().c_str(),
|
|
||||||
MOVEFILE_REPLACE_EXISTING) != 0;
|
|
||||||
#else
|
|
||||||
std::error_code error;
|
std::error_code error;
|
||||||
fs::rename(src, dest, error);
|
fs::rename(src, dest, error);
|
||||||
return !error;
|
return !error;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue