Set cwd to home dir

This commit is contained in:
kramo
2023-05-20 08:46:03 +02:00
parent 0715c77c06
commit f2c807d8e8

View File

@@ -19,6 +19,7 @@
import json import json
import os import os
from pathlib import Path
from time import time from time import time
from gi.repository import Adw, Gio, GLib, Gtk from gi.repository import Adw, Gio, GLib, Gtk
@@ -173,7 +174,9 @@ class Game(Gtk.Box):
else self.executable # Others 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"): if Gio.Settings.new("hu.kramo.Cartridges").get_boolean("exit-after-launch"):
self.app.quit() self.app.quit()