Support relative paths in 'loadxml' command
(relative to FG_ROOT or an aircraft dir)
This commit is contained in:
parent
10eadf0c6e
commit
bca3494462
1 changed files with 4 additions and 0 deletions
|
@ -1349,6 +1349,10 @@ do_load_xml_to_proptree(const SGPropertyNode * arg)
|
|||
if (file.extension() != "xml")
|
||||
file.concat(".xml");
|
||||
|
||||
if (file.isRelative()) {
|
||||
file = globals->resolve_maybe_aircraft_path(file.str());
|
||||
}
|
||||
|
||||
if (!fgValidatePath(file.c_str(), false)) {
|
||||
SG_LOG(SG_IO, SG_ALERT, "loadxml: reading '" << file.str() << "' denied "
|
||||
"(unauthorized access)");
|
||||
|
|
Loading…
Reference in a new issue