diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-06-29 21:02:57 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2022-06-29 21:03:15 +0300 |
commit | b0e98406488f712220175141f2b0f45a95082f12 (patch) | |
tree | 4a965843d24f984caf12722c7809a84797ddc212 /indra/newview/llsettingsvo.cpp | |
parent | 76c8a7ff0b57e7856613960391be7c400384183b (diff) | |
parent | 1e4f2ec07e32a142f35817d3186a124df3f8cd25 (diff) |
Merge branch 'master' into DRTVWR-539
Diffstat (limited to 'indra/newview/llsettingsvo.cpp')
-rw-r--r-- | indra/newview/llsettingsvo.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index 14a9f4aa30..7c762170a7 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -1026,12 +1026,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; |