summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorJonathan Yap <jhwelch@gmail.com>2015-02-19 14:34:31 -0500
committerJonathan Yap <jhwelch@gmail.com>2015-02-19 14:34:31 -0500
commit2d31abfcd97d844343b642b4aef56e26d7883a00 (patch)
tree79dedef5df837729884c5ef71631f640c02c37f0 /indra
parent7b8206476466a33235f6300152645493e18be357 (diff)
STORM-2082 Fix edge case bug
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpresetsmanager.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/llpresetsmanager.cpp b/indra/newview/llpresetsmanager.cpp
index 205c5e6dfb..9fa5282862 100644
--- a/indra/newview/llpresetsmanager.cpp
+++ b/indra/newview/llpresetsmanager.cpp
@@ -246,16 +246,19 @@ void LLPresetsManager::loadPreset(const std::string& subdirectory, const std::st
bool LLPresetsManager::deletePreset(const std::string& subdirectory, const std::string& name)
{
+ bool sts = true;
+
if (PRESETS_DEFAULT == name)
{
+ // This code should never execute
LL_WARNS("Presets") << "You are not allowed to delete the default preset." << LL_ENDL;
- return false;
+ sts = false;
}
if (gDirUtilp->deleteFilesInDir(getPresetsDir(subdirectory), LLURI::escape(name) + ".xml") < 1)
{
LL_WARNS("Presets") << "Error removing preset " << name << " from disk" << LL_ENDL;
- return false;
+ sts = false;
}
// If you delete the preset that is currently marked as loaded then also indicate that no preset is loaded.
@@ -267,7 +270,7 @@ bool LLPresetsManager::deletePreset(const std::string& subdirectory, const std::
// signal interested parties
triggerChangeSignal();
- return true;
+ return sts;
}
boost::signals2::connection LLPresetsManager::setPresetListChangeCallback(const preset_list_signal_t::slot_type& cb)