From 237b2c2d7e9c4844d4ca7c8f97b3a8b53eb9dec4 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Fri, 5 Dec 2008 05:00:17 -0700 Subject: Fixed blank url_history.xml creation. (VWR-5808) --- ChangeLog.txt | 4 ++++ linden/indra/newview/llurlhistory.cpp | 13 ++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index f9b2fed..e1d0ae3 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -58,6 +58,10 @@ Rebranded login menu. [#23] + * linden/indra/newview/llurlhistory.cpp: + Fixed blank url_history.xml creation. (VWR-5808) + + =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =- 1.0.0 RC2 -= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- diff --git a/linden/indra/newview/llurlhistory.cpp b/linden/indra/newview/llurlhistory.cpp index ac3fa93..0dadbd0 100644 --- a/linden/indra/newview/llurlhistory.cpp +++ b/linden/indra/newview/llurlhistory.cpp @@ -72,9 +72,16 @@ bool LLURLHistory::loadFile(const std::string& filename) // static bool LLURLHistory::saveFile(const std::string& filename) -{ - std::string temp_str = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter(); - llofstream out((temp_str + filename)); +{ + std::string temp_str = gDirUtilp->getLindenUserDir(); + if( temp_str.empty() ) + { + llwarns << "Can't save. No user directory set." << llendl; + return false; + } + + temp_str += gDirUtilp->getDirDelimiter() + filename; + llofstream out(temp_str); if (!out.good()) { llwarns << "Unable to open " << filename << " for output." << llendl; -- cgit v1.1