diff options
| author | Rye <rye@alchemyviewer.org> | 2026-01-09 14:57:39 -0500 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-01-09 22:21:40 +0200 |
| commit | 693964950fa4eacc6e83bcd5ec76aaada3ee1c16 (patch) | |
| tree | b7c6d4b0a81b04c93b9623cd9314f93ac27d45aa | |
| parent | 9de30971d327a1c9bda9f8e4f8e01f1b9d49f5fe (diff) | |
secondlife/viewer#5083 Fix external editor default open handling failing to work on mac and windows
| -rw-r--r-- | indra/newview/llexternaleditor.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp index 193a42f9f6..c3aad4ee65 100644 --- a/indra/newview/llexternaleditor.cpp +++ b/indra/newview/llexternaleditor.cpp @@ -46,9 +46,13 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env { LL_INFOS() << "Editor command is empty or not set, falling back to OS open handler" << LL_ENDL; #if LL_WINDOWS - static const std::string os_cmd = "%SystemRoot%\\explorer.exe \"%s\""; + std::string os_cmd = LLStringUtil::getenv("SystemRoot", ""); + if (!os_cmd.empty()) + { + os_cmd.append("\\explorer.exe \"%s\""); + } #elif LL_DARWIN - static const std::string os_cmd = "/usr/bin/open \"%s\""; + static const std::string os_cmd = "/usr/bin/open -t \"%s\""; #elif LL_LINUX static const std::string os_cmd = "/usr/bin/xdg-open \"%s\""; #endif |
