1
0
Fork 0

Launcher add-ons: drop missing paths on load

Don’t probe for, or pass, missing paths to FlightGear. Since we don’t
show such paths in the UI, they hang around forever, causing exceptions

Sentry-Id: FLIGHTGEAR-NG
This commit is contained in:
James Turner 2020-11-02 14:54:37 +00:00 committed by James Turner
parent e62c64859c
commit 3c1594ead4

View file

@ -72,9 +72,13 @@ AddOnsController::AddOnsController(LauncherMainWindow *parent, LaunchConfig* con
settings.setArrayIndex(i);
QString path = settings.value("path").toString();
m_addonModulePaths.push_back( path );
const SGPath addonPath(path.toStdString());
if (!addonPath.exists()) {
// drop non-existing paths on load
continue;
}
m_addonModulePaths.push_back( path );
bool enable = settings.value("enable").toBool();
try {