If a log file doesn't exist, just let the user know with a sound

Also a warning, in the log, displaying the path.
This commit is contained in:
Lirusaito
2019-04-13 03:02:26 -04:00
parent 947cf57100
commit c78770138d

View File

@@ -1163,6 +1163,12 @@ void LLFloaterIMPanel::onFlyoutCommit(LLComboBox* flyout, const LLSD& value)
void show_log_browser(const std::string& name, const std::string& id)
{
const std::string file(LLLogChat::makeLogFileName(name));
if (!LLFile::isfile(file))
{
make_ui_sound("UISndBadKeystroke");
LL_WARNS() << "File not present: " << file << LL_ENDL;
return;
}
if (gSavedSettings.getBOOL("LiruLegacyLogLaunch"))
{
if (!LLWindow::ShellEx(file)) // 0 = success, otherwise fallback on internal browser.