From 543b7ee9f7eb104497e971961fc0c39ed32ef54d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 12 Oct 2012 11:09:25 -0400 Subject: Fix LLUI::locateSkin() failure case; clarify lldir.cpp static init. Per code review: Previous refactoring of LLUI::locateSkin() preserved odd failure behavior: it would return last-considered pathname, whether or not it exists. Changed to emit LL_WARNS log message and return empty string. Use Boost.Assign to simplify initialization of a couple static containers in lldir.cpp. --- indra/llui/llui.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp index 507ced9172..6d2bc1837c 100644 --- a/indra/llui/llui.cpp +++ b/indra/llui/llui.cpp @@ -1859,15 +1859,13 @@ std::string LLUI::locateSkin(const std::string& filename) } found_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, filename); -/*==========================================================================*| - // Hmm, if we got this far, previous implementation of this method would - // return this last found_file value whether or not it actually exists. if (gDirUtilp->fileExists(found_file)) { return found_file; } -|*==========================================================================*/ - return found_file; + LL_WARNS("LLUI") << "Can't find '" << filename + << "' in user settings, any skin directory or app_settings" << LL_ENDL; + return ""; } //static -- cgit v1.2.3