diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2025-12-01 17:27:19 +0200 |
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2025-12-01 17:27:44 +0200 |
| commit | 1565e460830f9e3d9e4cd4d82977df6c17eb3112 (patch) | |
| tree | 74c3f90d2d0129f7d5e58805e15ed3480b241063 /indra/newview/llexternaleditor.cpp | |
| parent | a9e8676611bf0ffda077a6d7561e0d57f9e3fcf7 (diff) | |
| parent | 906c58ac3821ce364096b7c7f2df80b67d9740b6 (diff) | |
Merge branch 'develop' into maxim/voice-moderation
Diffstat (limited to 'indra/newview/llexternaleditor.cpp')
| -rw-r--r-- | indra/newview/llexternaleditor.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp index 3decd15bbd..193a42f9f6 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 + 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; |
