diff --git a/plugins/common/plugin/NativeHelpers.cpp b/plugins/common/plugin/NativeHelpers.cpp index 29206eb..8300fff 100644 --- a/plugins/common/plugin/NativeHelpers.cpp +++ b/plugins/common/plugin/NativeHelpers.cpp @@ -16,12 +16,14 @@ #if defined(_WIN32) const fs::path toPlatformAgnosticPath(std::string& filePath) { - return fs::u8path(filePath.replace(filePath.begin(), filePath.end(), '\\', '/')); + std::replace(filePath.begin(), filePath.end(), '\\', '/'); + return fs::u8path(filePath); } const fs::path fromPlatformAgnosticPath(const char *filePath) { - std::string p{filePath}; - return fs::u8path(p.replace(p.begin(), p.end(), '/', '\\')); + std::string p { filePath }; + std::replace(p.begin(), p.end(), '/', '\\'); + return fs::u8path(p); } #else const fs::path toPlatformAgnosticPath(std::string& filePath)