diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-03-17 23:06:05 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-03-17 23:06:05 +0200 |
| commit | 19cdf73eaa51c83b6dcb8e15106222d6ce2a723d (patch) | |
| tree | 85734e587d3df7e8f4d46cf5d51c27097016058b /indra/newview/llpreviewscript.cpp | |
| parent | 39dda55e94448e0067e241086f4b387ceb9c8bb4 (diff) | |
#3747 Use correct extension for temporary script files
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
| -rw-r--r-- | indra/newview/llpreviewscript.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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; } } |
