Restore current dir to ~ after game installed/stopped

This commit is contained in:
Xodetaetl 2015-08-15 20:59:34 +02:00
parent 1b963a7097
commit 7f426907b8
2 changed files with 3 additions and 0 deletions

View file

@ -162,6 +162,7 @@ class InstallerDialog(Gtk.Window):
self.show_non_empty_warning()
def on_destroy(self, widget):
os.chdir(os.path.expanduser('~'))
if self.interpreter:
self.interpreter.cleanup()
if self.parent:

View file

@ -69,6 +69,7 @@ class LutrisThread(threading.Thread):
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
cwd=self.path, env=env)
os.chdir(os.path.expanduser('~'))
for line in iter(self.game_process.stdout.readline, ''):
self.stdout += line
@ -99,6 +100,7 @@ class LutrisThread(threading.Thread):
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
cwd=self.path)
os.chdir(os.path.expanduser('~'))
def iter_children(self, process, topdown=True, first=True):
if self.runner and self.runner.name.startswith('wine') and first: