From 0d06072821959a1fb5e0fff2ec987adcc123fe03 Mon Sep 17 00:00:00 2001 From: zimuya4153 Date: Sun, 17 Aug 2025 19:57:19 +0800 Subject: [PATCH] fix: fix the issue where Chinese paths could not load --- src/legacy/main/NodeJsHelper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/legacy/main/NodeJsHelper.cpp b/src/legacy/main/NodeJsHelper.cpp index 9cc753e..53c7d22 100644 --- a/src/legacy/main/NodeJsHelper.cpp +++ b/src/legacy/main/NodeJsHelper.cpp @@ -222,10 +222,10 @@ bool loadPluginCode(script::ScriptEngine* engine, std::string entryScriptPath, s // check if entryScriptPath is not absolute path if (auto path = std::filesystem::path(entryScriptPath); !path.is_absolute()) { - entryScriptPath = std::filesystem::absolute(path).string(); + entryScriptPath = ll::string_utils::u8str2str(std::filesystem::absolute(path).u8string()); } if (auto path = std::filesystem::path(pluginDirPath); !path.is_absolute()) { - pluginDirPath = std::filesystem::absolute(path).string(); + pluginDirPath = ll::string_utils::u8str2str(std::filesystem::absolute(path).u8string()); } pluginDirPath = ll::string_utils::replaceAll(pluginDirPath, "\\", "/"); entryScriptPath = ll::string_utils::replaceAll(entryScriptPath, "\\", "/");