diff options
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llluafloater.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/indra/llui/llluafloater.cpp b/indra/llui/llluafloater.cpp index 36dd0d58bd..27ae85c844 100644 --- a/indra/llui/llluafloater.cpp +++ b/indra/llui/llluafloater.cpp @@ -254,9 +254,15 @@ void LLLuaFloater::post(const LLSD &data) void LLLuaFloater::showLuaFloater(const LLSD &data) { std::filesystem::path fs_path(data["xml_path"].asString()); - + std::string path = fs_path.lexically_normal().string(); + if (!fs_path.is_absolute()) + { + std::string lib_path = gDirUtilp->getExpandedFilename(LL_PATH_SCRIPTS, "lua"); + path = (std::filesystem::path(lib_path) / path).u8string(); + } + LLLuaFloater *floater = new LLLuaFloater(data); - floater->buildFromFile(fs_path.lexically_normal().string()); + floater->buildFromFile(path); floater->openFloater(floater->getKey()); } |