summaryrefslogtreecommitdiff
path: root/indra/newview/llexternaleditor.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-12-04 13:58:12 +0800
committerErik Kundiman <erik@megapahit.org>2025-12-04 16:48:50 +0800
commite3a35af2c676fb211ff7d01a79eb1a3299bc82f3 (patch)
tree0ff7a0a15d1a53850399250b65f0a2a42f7bbf22 /indra/newview/llexternaleditor.cpp
parentac052bed7f9f97efc63f0a0322214d4dcdcd5664 (diff)
parentc4ec3d866082d588de671e833413474d7ab19524 (diff)
Merge remote-tracking branch 'secondlife/release/2026.01' into 2026.01
Diffstat (limited to 'indra/newview/llexternaleditor.cpp')
-rw-r--r--indra/newview/llexternaleditor.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp
index 3decd15bbd..5d8b83f623 100644
--- a/indra/newview/llexternaleditor.cpp
+++ b/indra/newview/llexternaleditor.cpp
@@ -44,8 +44,20 @@ 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
+ static const std::string os_cmd = "%SystemRoot%\\explorer.exe \"%s\"";
+#elif LL_DARWIN
+ static const std::string os_cmd = "/usr/bin/open \"%s\"";
+#elif LL_LINUX || __FreeBSD__
+ 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;