1
0
Fork 0

Support relative paths in 'loadxml' command

(relative to FG_ROOT or an aircraft dir)
This commit is contained in:
James Turner 2010-08-15 11:02:15 +01:00
parent 10eadf0c6e
commit bca3494462

View file

@ -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)");