From b30f8a48d33ca88c0e0042465169bd05c84ebda3 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 2 Apr 2023 21:01:28 +0200 Subject: [PATCH] Fixed an issue where FileSystemUtil::renameFile() did sometimes not provide a return value for if it actually succeeded or not --- es-core/src/utils/FileSystemUtil.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/es-core/src/utils/FileSystemUtil.cpp b/es-core/src/utils/FileSystemUtil.cpp index de2341377..907deb895 100644 --- a/es-core/src/utils/FileSystemUtil.cpp +++ b/es-core/src/utils/FileSystemUtil.cpp @@ -739,13 +739,11 @@ namespace Utils } #if defined(_WIN64) - _wrename(Utils::String::stringToWideString(sourcePath).c_str(), - Utils::String::stringToWideString(destinationPath).c_str()); + return _wrename(Utils::String::stringToWideString(sourcePath).c_str(), + Utils::String::stringToWideString(destinationPath).c_str()); #else - std::rename(sourcePath.c_str(), destinationPath.c_str()); + return std::rename(sourcePath.c_str(), destinationPath.c_str()); #endif - - return false; } bool removeFile(const std::string& path)