diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-03-19 15:32:47 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2024-03-19 15:32:47 +0200 |
commit | ad1f5ac8906316f8e90355a4ebdbf33400758080 (patch) | |
tree | 550f849fe145b5d80eaf4eea3c076c1f7a3a5e47 /indra/llui | |
parent | 052fdac5187cc529bbbe9be0c8d0f27516058ebd (diff) |
search xml file in the lib, if path is not full; add test lua floater scripts
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()); } |