mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-03-27 01:03:09 +00:00
Skip heroic games and unquotable paths in removeMissingGames
This commit is contained in:
parent
66d80b0eea
commit
8e2fedccfb
1 changed files with 5 additions and 4 deletions
|
|
@ -1255,19 +1255,20 @@ void App::removeMissingGames()
|
||||||
// Skip URL-based launchers (Steam, Lutris, etc.)
|
// Skip URL-based launchers (Steam, Lutris, etc.)
|
||||||
if (launchCommand.startsWith(QLatin1String("steam://")) || launchCommand.startsWith(QLatin1String("lutris:"))
|
if (launchCommand.startsWith(QLatin1String("steam://")) || launchCommand.startsWith(QLatin1String("lutris:"))
|
||||||
|| launchCommand.startsWith(QLatin1String("xdg-open")) || launchCommand.startsWith(QLatin1String("flatpak run"))
|
|| launchCommand.startsWith(QLatin1String("xdg-open")) || launchCommand.startsWith(QLatin1String("flatpak run"))
|
||||||
|| launchCommand.startsWith(QLatin1String("legendary launch")) || launchCommand.startsWith(QLatin1String("bottles"))) {
|
|| launchCommand.startsWith(QLatin1String("legendary launch")) || launchCommand.startsWith(QLatin1String("bottles"))
|
||||||
|
|| launchCommand.startsWith(QLatin1String("heroic "))) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract executable path from command
|
// Extract executable path from command
|
||||||
QString executable = launchCommand;
|
QString executable = launchCommand;
|
||||||
|
|
||||||
// Handle quoted paths
|
|
||||||
if (executable.startsWith(QLatin1Char('"'))) {
|
if (executable.startsWith(QLatin1Char('"'))) {
|
||||||
int endQuote = executable.indexOf(QLatin1Char('"'), 1);
|
int endQuote = executable.indexOf(QLatin1Char('"'), 1);
|
||||||
if (endQuote > 0) {
|
if (endQuote <= 0) {
|
||||||
executable = executable.mid(1, endQuote - 1);
|
continue;
|
||||||
}
|
}
|
||||||
|
executable = executable.mid(1, endQuote - 1);
|
||||||
} else {
|
} else {
|
||||||
// Take first word as executable
|
// Take first word as executable
|
||||||
int space = executable.indexOf(QLatin1Char(' '));
|
int space = executable.indexOf(QLatin1Char(' '));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue