From f2c807d8e8de8cf6c5b6527195633a675db2f127 Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Sat, 20 May 2023 08:46:03 +0200 Subject: [PATCH] Set cwd to home dir --- src/game.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game.py b/src/game.py index 1776e31..576ebf1 100644 --- a/src/game.py +++ b/src/game.py @@ -19,6 +19,7 @@ import json import os +from pathlib import Path from time import time from gi.repository import Adw, Gio, GLib, Gtk @@ -173,7 +174,9 @@ class Game(Gtk.Box): else self.executable # Others ) - GLib.spawn_async(argv, flags=GLib.SpawnFlags.SEARCH_PATH) + GLib.spawn_async( + argv, working_directory=str(Path.home()), flags=GLib.SpawnFlags.SEARCH_PATH + ) if Gio.Settings.new("hu.kramo.Cartridges").get_boolean("exit-after-launch"): self.app.quit()