Partially fix game not launching when path have single quote
This commit is contained in:
@@ -240,10 +240,11 @@ except FileNotFoundError:
|
||||
globals()['_'] = gettext.gettext
|
||||
|
||||
def format_title(title):
|
||||
title_formatted = re.sub(r'[^a-zA-Z0-9\s]', '', title)
|
||||
title_formatted = title_formatted.replace(' ', '-')
|
||||
title_formatted = '-'.join(title_formatted.lower().split())
|
||||
return title_formatted
|
||||
title = title.strip().lower()
|
||||
title = re.sub(r"['’]", "", title)
|
||||
title = re.sub(r"[^a-z0-9]+", "-", title)
|
||||
title = title.strip("-")
|
||||
return title
|
||||
|
||||
class ConfigManager:
|
||||
def __init__(self):
|
||||
|
||||
@@ -14,6 +14,7 @@ import gettext
|
||||
import locale
|
||||
import json
|
||||
import time
|
||||
import shlex
|
||||
|
||||
class PathManager:
|
||||
@staticmethod
|
||||
@@ -822,13 +823,13 @@ def build_launch_command(game):
|
||||
if runner == "Linux-Native":
|
||||
command_parts.append('UMU_NO_PROTON=1')
|
||||
elif runner == "Proton-CachyOS":
|
||||
command_parts.append(f"WINEPREFIX='{prefix}'")
|
||||
command_parts.append(f"WINEPREFIX={shlex.quote(prefix)}")
|
||||
command_parts.append(f"PROTONPATH={proton_cachyos}")
|
||||
else:
|
||||
command_parts.append(f"WINEPREFIX='{prefix}'")
|
||||
command_parts.append(f"WINEPREFIX={shlex.quote(prefix)}")
|
||||
command_parts.append(f"PROTONPATH={runner}")
|
||||
else:
|
||||
command_parts.append(f"WINEPREFIX='{prefix}'")
|
||||
command_parts.append(f"WINEPREFIX={shlex.quote(prefix)}")
|
||||
if gamemode:
|
||||
command_parts.append(gamemode)
|
||||
if launch_arguments:
|
||||
@@ -847,9 +848,9 @@ def build_launch_command(game):
|
||||
command_parts.append(f"'{umu_run}'")
|
||||
|
||||
if addapp_checkbox == "addapp_enabled":
|
||||
command_parts.append(f"'{addapp_bat}'")
|
||||
command_parts.append(shlex.quote(addapp_bat))
|
||||
else:
|
||||
command_parts.append(f"'{path}'")
|
||||
command_parts.append(shlex.quote(path))
|
||||
|
||||
if game_arguments:
|
||||
command_parts.append(game_arguments)
|
||||
|
||||
Reference in New Issue
Block a user