summaryrefslogtreecommitdiff
path: root/indra/newview/llexternaleditor.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2026-03-12 00:18:29 -0400
committerGitHub <noreply@github.com>2026-03-12 00:18:29 -0400
commit18db816ef7552785ffa26d6d0397efbb341a999f (patch)
tree9c289d5f63d0f52783520c0100c74fd4fb756549 /indra/newview/llexternaleditor.cpp
parentbf347d15804c27348c84a55ab763f89b718e8aac (diff)
parente572093ef7e0ed4c9d94be4ecaae850bcdb73e54 (diff)
Merge pull request #5097 from secondlife/release/2026.01
2026.01
Diffstat (limited to 'indra/newview/llexternaleditor.cpp')
-rw-r--r--indra/newview/llexternaleditor.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp
index 3decd15bbd..c3aad4ee65 100644
--- a/indra/newview/llexternaleditor.cpp
+++ b/indra/newview/llexternaleditor.cpp
@@ -44,8 +44,24 @@ LLExternalEditor::EErrorCode LLExternalEditor::setCommand(const std::string& env
std::string cmd = findCommand(env_var, override);
if (cmd.empty())
{
- LL_WARNS() << "Editor command is empty or not set" << LL_ENDL;
- return EC_NOT_SPECIFIED;
+ LL_INFOS() << "Editor command is empty or not set, falling back to OS open handler" << LL_ENDL;
+#if LL_WINDOWS
+ 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 -t \"%s\"";
+#elif LL_LINUX
+ static const std::string os_cmd = "/usr/bin/xdg-open \"%s\"";
+#endif
+ cmd = findCommand("", os_cmd);
+ if (cmd.empty())
+ {
+ LL_WARNS() << "Failed to find OS open handler \"" << cmd << "\"" << LL_ENDL;
+ return EC_NOT_SPECIFIED;
+ }
}
string_vec_t tokens;