Skip to content

Commit

Permalink
Fixed quotes when creating shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
Faugus authored Nov 2, 2024
1 parent 189f569 commit ffe0593
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions faugus-launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -856,19 +856,19 @@ def add_shortcut(self, game, shortcut_state, icon_temp, icon_final):
command_parts.append(launch_arguments)

# Add the fixed command and remaining arguments
command_parts.append('"/usr/bin/umu-run"')
command_parts.append("'/usr/bin/umu-run'")
if path:
command_parts.append(f'"{path}"')
command_parts.append(f"'{path}'")
if game_arguments:
command_parts.append(f'"{game_arguments}"')
command_parts.append(f"'{game_arguments}'")

# Join all parts into a single command
command = ' '.join(command_parts)

# Create a .desktop file
desktop_file_content = f"""[Desktop Entry]
Name={game.title}
Exec=/usr/bin/faugus-run '{command}'
Exec=/usr/bin/faugus-run "{command}"
Icon={new_icon_path}
Type=Application
Categories=Game;
Expand Down Expand Up @@ -2915,19 +2915,19 @@ def on_ok_clicked(self, widget):
command_parts.append(launch_arguments)

# Add the fixed command and remaining arguments
command_parts.append('"/usr/bin/umu-run"')
command_parts.append("'/usr/bin/umu-run'")
if self.file_path:
command_parts.append(f'"{self.file_path}"')
command_parts.append(f"'{self.file_path}'")
if game_arguments:
command_parts.append(f'"{game_arguments}"')
command_parts.append(f"'{game_arguments}'")

# Join all parts into a single command
command = ' '.join(command_parts)

# Create a .desktop file
desktop_file_content = f"""[Desktop Entry]
Name={title}
Exec=/usr/bin/faugus-run '{command}'
Exec=/usr/bin/faugus-run "{command}"
Icon={new_icon_path}
Type=Application
Categories=Game;
Expand Down

0 comments on commit ffe0593

Please sign in to comment.