From 19cdf73eaa51c83b6dcb8e15106222d6ce2a723d Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Mon, 17 Mar 2025 23:06:05 +0200 Subject: #3747 Use correct extension for temporary script files --- indra/newview/llpreviewscript.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpreviewscript.cpp') diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 98c28ffadc..8273af35ab 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1557,13 +1557,15 @@ std::string LLScriptEdContainer::getTmpFileName(const std::string& script_name) LLMD5 script_id_hash((const U8 *)script_id.c_str()); script_id_hash.hex_digest(script_id_hash_str); + std::string script_extension = mScriptEd->mEditor->getIsLuauLanguage() ? ".luau" : ".lsl"; + if (script_name.empty()) { - return std::string(LLFile::tmpdir()) + "sl_script_" + script_id_hash_str + ".lsl"; + return std::string(LLFile::tmpdir()) + "sl_script_" + script_id_hash_str + script_extension; } else { - return std::string(LLFile::tmpdir()) + "sl_script_" + script_name + "_" + script_id_hash_str + ".lsl"; + return std::string(LLFile::tmpdir()) + "sl_script_" + script_name + "_" + script_id_hash_str + script_extension; } } -- cgit v1.3