diff --git a/doc/contributions.txt b/doc/contributions.txt index 042efca6b5cce299051d657f24505a48ecd1c5c6..de59cb137f3e9e65b3c8963ff5a68ef13656b56a 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -321,6 +321,7 @@ Cinder Roxley STORM-1958 STORM-1952 STORM-1951 + STORM-1949 STORM-2035 STORM-2036 STORM-2037 diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp index 271e4d7d9d19ec2c3a282da26a5d29a61dc085a0..d1116918a6a74245b2a58eb56a1489199ec489de 100755 --- a/indra/newview/llexternaleditor.cpp +++ b/indra/newview/llexternaleditor.cpp @@ -43,8 +43,22 @@ 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 on generic open handler." << LL_ENDL; +#if LL_WINDOWS + std::string comspec(getenv("COMSPEC")); + comspec.append(" /C START \"%s\""); + cmd = findCommand(LLStringUtil::null, comspec); +#elif LL_DARWIN + cmd = findCommand(LLStringUtil::null, "/usr/bin/open \"%s\""); +#elif LL_LINUX + // xdg-open might not actually be installed on all distros, but it's our best bet. + cmd = findCommand(LLStringUtil::null, "/usr/bin/xdg-open \"%s\""); +#endif + if (cmd.empty()) + { + LL_WARNS() << "Failed to find generic open handler: " << cmd << LL_ENDL; + return EC_NOT_SPECIFIED; + } } string_vec_t tokens;