mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-03-27 01:03:09 +00:00
Quote app name in Heroic launch command
This commit is contained in:
parent
fdc57c457c
commit
66d80b0eea
1 changed files with 4 additions and 3 deletions
|
|
@ -61,13 +61,14 @@ QString HeroicImporter::findLegendaryConfigPath() const
|
||||||
|
|
||||||
QString HeroicImporter::launchCommandForApp(const QString &appName) const
|
QString HeroicImporter::launchCommandForApp(const QString &appName) const
|
||||||
{
|
{
|
||||||
|
const QString safe = QString(appName).replace(QLatin1Char('"'), QLatin1String("\\\""));
|
||||||
if (!findExecutable(QStringLiteral("heroic")).isEmpty()) {
|
if (!findExecutable(QStringLiteral("heroic")).isEmpty()) {
|
||||||
return QStringLiteral("heroic --launch %1").arg(appName);
|
return QStringLiteral("heroic --launch \"%1\"").arg(safe);
|
||||||
}
|
}
|
||||||
if (!findExecutable(QStringLiteral("flatpak")).isEmpty()) {
|
if (!findExecutable(QStringLiteral("flatpak")).isEmpty()) {
|
||||||
return QStringLiteral("flatpak run com.heroicgameslauncher.hgl --launch %1").arg(appName);
|
return QStringLiteral("flatpak run com.heroicgameslauncher.hgl --launch \"%1\"").arg(safe);
|
||||||
}
|
}
|
||||||
return QStringLiteral("heroic --launch %1").arg(appName);
|
return QStringLiteral("heroic --launch \"%1\"").arg(safe);
|
||||||
}
|
}
|
||||||
|
|
||||||
QUrl HeroicImporter::extractCoverUrl(const QJsonObject &gameObj) const
|
QUrl HeroicImporter::extractCoverUrl(const QJsonObject &gameObj) const
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue