Always make sure the Terrasync directory is set and exists
This was previously done only if Terrasync was on, but this made it impossible to use the GUI dialog to turn it on for the first time in a fresh install
This commit is contained in:
parent
24c1129140
commit
4427ee7406
1 changed files with 24 additions and 25 deletions
|
@ -2167,7 +2167,6 @@ OptionResult Options::processOptions()
|
|||
}
|
||||
|
||||
// terrasync directory fixup
|
||||
if (fgGetBool("/sim/terrasync/enabled")) {
|
||||
string terrasyncDir = fgGetString("/sim/terrasync/scenery-dir");
|
||||
if (terrasyncDir.empty()) {
|
||||
SGPath p(globals->get_fg_home());
|
||||
|
@ -2191,7 +2190,7 @@ OptionResult Options::processOptions()
|
|||
if (!objectsDir.exists()) {
|
||||
objectsDir.create(0755);
|
||||
}
|
||||
|
||||
if (fgGetBool("/sim/terrasync/enabled")) {
|
||||
const string_list& scenery_paths(globals->get_fg_scenery());
|
||||
if (std::find(scenery_paths.begin(), scenery_paths.end(), terrasyncDir) == scenery_paths.end()) {
|
||||
// terrasync dir is not in the scenery paths, add it
|
||||
|
|
Loading…
Add table
Reference in a new issue