Skip to content

Commit 0d06072

Browse files
committed
fix: fix the issue where Chinese paths could not load
1 parent f2eb418 commit 0d06072

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/legacy/main/NodeJsHelper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ bool loadPluginCode(script::ScriptEngine* engine, std::string entryScriptPath, s
222222

223223
// check if entryScriptPath is not absolute path
224224
if (auto path = std::filesystem::path(entryScriptPath); !path.is_absolute()) {
225-
entryScriptPath = std::filesystem::absolute(path).string();
225+
entryScriptPath = ll::string_utils::u8str2str(std::filesystem::absolute(path).u8string());
226226
}
227227
if (auto path = std::filesystem::path(pluginDirPath); !path.is_absolute()) {
228-
pluginDirPath = std::filesystem::absolute(path).string();
228+
pluginDirPath = ll::string_utils::u8str2str(std::filesystem::absolute(path).u8string());
229229
}
230230
pluginDirPath = ll::string_utils::replaceAll(pluginDirPath, "\\", "/");
231231
entryScriptPath = ll::string_utils::replaceAll(entryScriptPath, "\\", "/");

0 commit comments

Comments
 (0)