Allow -jsbsim, -yasim or -uiuc in the name of the configuration file when it resides in it's own subdirectory
This commit is contained in:
parent
4d6b14a08c
commit
13d8e0edab
1 changed files with 11 additions and 1 deletions
|
@ -534,9 +534,19 @@ bool fgInitConfig ( int argc, char **argv ) {
|
|||
aircraft_path.concat("-set.xml");
|
||||
|
||||
if ( !ulFileExists(aircraft_path.c_str()) ) {
|
||||
string adir = aircraft;
|
||||
int pos, alen = adir.length();
|
||||
|
||||
if ( ((pos = adir.rfind("-jsbsim")) != string::npos) ||
|
||||
((pos = adir.rfind("-yasim")) != string::npos) ||
|
||||
((pos = adir.rfind("-uiuc")) != string::npos) )
|
||||
{
|
||||
adir.erase(pos, alen);
|
||||
}
|
||||
|
||||
aircraft_path = globals->get_fg_root();
|
||||
aircraft_path.append("Aircraft");
|
||||
aircraft_path.append(aircraft);
|
||||
aircraft_path.append(adir);
|
||||
aircraft_path.append(aircraft);
|
||||
aircraft_path.concat("-set.xml");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue