summaryrefslogtreecommitdiff
path: root/indra/newview/llsettingsvo.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2021-09-23 16:28:14 -0400
committerNat Goodspeed <nat@lindenlab.com>2021-09-23 16:28:14 -0400
commit274fc85fcbbe37f491f2d78b8b0f0b4ebb7bba26 (patch)
treee27d31612409d665120defe7f7d120ea5a876324 /indra/newview/llsettingsvo.cpp
parent2b96d1bbe00c317ea8dfe420dd4167dde5d153ae (diff)
parent1d6bfb727a8015e82cd4060a0c73cf3fc719e818 (diff)
DRTVWR-543: Merge branch 'DRTVWR-543-maint' into classic
Diffstat (limited to 'indra/newview/llsettingsvo.cpp')
-rw-r--r--indra/newview/llsettingsvo.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 1e5b893cbc..5991d4073f 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -1021,12 +1021,39 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyPreset(const std::string &n
std::set<std::string> framenames;
std::set<std::string> notfound;
+ // expected and correct folder sctructure is to have
+ // three folders in widnlight's root: days, water, skies
std::string base_path(gDirUtilp->getDirName(path));
std::string water_path(base_path);
std::string sky_path(base_path);
+ std::string day_path(base_path);
gDirUtilp->append(water_path, "water");
gDirUtilp->append(sky_path, "skies");
+ gDirUtilp->append(day_path, "days");
+
+ if (!gDirUtilp->fileExists(day_path))
+ {
+ LL_WARNS("SETTINGS") << "File " << name << ".xml is not in \"days\" folder." << LL_ENDL;
+ }
+
+ if (!gDirUtilp->fileExists(water_path))
+ {
+ LL_WARNS("SETTINGS") << "Failed to find accompaniying water folder for file " << name
+ << ".xml. Falling back to using default folder" << LL_ENDL;
+
+ water_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight");
+ gDirUtilp->append(water_path, "water");
+ }
+
+ if (!gDirUtilp->fileExists(sky_path))
+ {
+ LL_WARNS("SETTINGS") << "Failed to find accompaniying skies folder for file " << name
+ << ".xml. Falling back to using default folder" << LL_ENDL;
+
+ sky_path = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight");
+ gDirUtilp->append(sky_path, "skies");
+ }
newsettings[SETTING_NAME] = name;