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:
parent
36dd57f6f4
commit
e7594f4687
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue