From bcb5901dbff7ce4de96c1daafd6ea53d8893e854 Mon Sep 17 00:00:00 2001 From: Xodetaetl Date: Thu, 16 Oct 2014 00:04:09 +0200 Subject: [PATCH] Fix some working_dir and browse_dir --- lutris/runners/dosbox.py | 5 +++-- lutris/runners/linux.py | 2 +- lutris/runners/wine.py | 9 ++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lutris/runners/dosbox.py b/lutris/runners/dosbox.py index e10f4a8d7..0411c8b38 100644 --- a/lutris/runners/dosbox.py +++ b/lutris/runners/dosbox.py @@ -91,13 +91,14 @@ class dosbox(Runner): @property def browse_dir(self): """Return the path to open with the Browse Files action.""" - return self.working_dir # exe path + return os.path.dirname(self.main_file) \ + or super(dosbox, self).browse_dir @property def working_dir(self): """Return the working directory to use when running the game.""" return os.path.dirname(self.main_file) \ - or super(dosbox, self).browse_dir + or super(dosbox, self).working_dir def get_executable(self): return os.path.join(settings.RUNNER_DIR, "dosbox/bin/dosbox") diff --git a/lutris/runners/linux.py b/lutris/runners/linux.py index 7efb602b8..be6f85ee9 100644 --- a/lutris/runners/linux.py +++ b/lutris/runners/linux.py @@ -65,7 +65,7 @@ class linux(Runner): @property def browse_dir(self): """Return the path to open with the Browse Files action.""" - return self.working_dir # exe path + return self.game_exe @property def working_dir(self): diff --git a/lutris/runners/wine.py b/lutris/runners/wine.py index aea6c8c4b..ed17bf7b8 100644 --- a/lutris/runners/wine.py +++ b/lutris/runners/wine.py @@ -311,15 +311,14 @@ class wine(Runner): def game_exe(self): """Return the game's executable's path.""" exe = self.config['game'].get('exe') - if exe: - if os.path.isabs(exe): - return exe - return os.path.join(self.game_path, exe) + if exe and os.path.isabs(exe): + return exe + return os.path.join(self.game_path, exe) @property def browse_dir(self): """Return the path to open with the Browse Files action.""" - return self.working_dir # exe path + return self.game_exe @property def working_dir(self):