1
0
Fork 0

Call fgInitAllowedPaths() also in fgInitConfig()

This is an additional call to fgInitAllowedPaths(), earlier than the
normal one. It doesn't know the paths given to --allow-nasal-read, but
can already authorize read access for all of $FG_ROOT. This allows one
to add SGPath::validate() checks for paths given to
ResourceManager::findPath() with a non-null second argument (without
this change, the validation would fail for files included from
defaults.xml, read by fgSetDefaults() before the definitive
fgInitAllowedPaths() call has been performed).
This commit is contained in:
Florent Rougon 2022-08-24 00:05:32 +02:00
parent 36dd57f6f4
commit e7594f4687

View file

@ -711,6 +711,7 @@ int fgInitConfig ( int argc, char **argv, bool reinit )
if (result != flightgear::FG_OPTIONS_OK) {
return result;
}
fgInitAllowedPaths(); // preliminary: whitelist at least FGData
}
// establish default for developer-mode based upon compiled build types