mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T689 Add validation that XP model directories are within the XP sim directory.
This commit is contained in:
@@ -571,7 +571,14 @@ namespace BlackSimPlugin
|
||||
{
|
||||
Q_ASSERT(package.s.endsWith('/'));
|
||||
package.s.chop(1);
|
||||
m_trafficProxy->loadPlanesPackage(package.s);
|
||||
if (CDirectoryUtils::isSubDirectoryOf(package.s, getSimulatorSettings().getSimulatorDirectoryOrDefault()))
|
||||
{
|
||||
m_trafficProxy->loadPlanesPackage(package.s);
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(this).validationError(u"CSL package '%1' can not be loaded as it is outside the X-Plane installation directory") << package.s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user