1
0
Fork 0

Restored the legacy behavior: the XML extension is mandatory and when it is not explicitely specified it is automatically added.

This commit is contained in:
Bertrand Coconnier 2017-03-14 21:59:14 +01:00
parent 6e44fb1015
commit 40be2687f7

View file

@ -89,7 +89,7 @@ Element_ptr FGModelLoader::Open(Element *el)
SGPath CheckPathName(const SGPath& path, const SGPath& filename) {
SGPath fullName = path/filename.utf8Str();
if (fullName.extension().empty())
if (fullName.extension() != "xml")
fullName.concat(".xml");
return fullName.exists() ? fullName : SGPath();