From ab01a2d2fc7f650d1bca0c211cdf29d6103073dc Mon Sep 17 00:00:00 2001 From: Freagarach Date: Fri, 19 Nov 2021 11:34:26 +0000 Subject: [PATCH] Fix replay folders with special characters. Implemented in e7ab22286e, broken in cb346e207b. Patch by: @Langbart Help by: @elexis Differential revision: https://code.wildfiregames.com/D4345 Fixes: #6373 Reviewed by: @vladislavbelov Tested by: @Freagarach This was SVN commit r26005. --- source/ps/scripting/JSInterface_VisualReplay.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/ps/scripting/JSInterface_VisualReplay.cpp b/source/ps/scripting/JSInterface_VisualReplay.cpp index 747dbac426..5f7a5687ec 100644 --- a/source/ps/scripting/JSInterface_VisualReplay.cpp +++ b/source/ps/scripting/JSInterface_VisualReplay.cpp @@ -28,7 +28,8 @@ namespace JSI_VisualReplay { CStrW GetReplayDirectoryName(const CStrW& directoryName) { - return OsPath(VisualReplay::GetDirectoryPath() / directoryName).string(); + // The string conversion is added to account for non-latin characters. + return wstring_from_utf8(OsPath(VisualReplay::GetDirectoryPath() / directoryName).string8()); } void RegisterScriptFunctions(const ScriptRequest& rq)