Fixed an issue where FileSystemUtil::renameFile() did sometimes not provide a return value for if it actually succeeded or not

This commit is contained in:
Leon Styhre 2023-04-02 21:01:28 +02:00
parent cc9684ac21
commit b30f8a48d3

View file

@ -739,13 +739,11 @@ namespace Utils
} }
#if defined(_WIN64) #if defined(_WIN64)
_wrename(Utils::String::stringToWideString(sourcePath).c_str(), return _wrename(Utils::String::stringToWideString(sourcePath).c_str(),
Utils::String::stringToWideString(destinationPath).c_str()); Utils::String::stringToWideString(destinationPath).c_str());
#else #else
std::rename(sourcePath.c_str(), destinationPath.c_str()); return std::rename(sourcePath.c_str(), destinationPath.c_str());
#endif #endif
return false;
} }
bool removeFile(const std::string& path) bool removeFile(const std::string& path)