Fix some working_dir and browse_dir

This commit is contained in:
Xodetaetl
2014-10-16 00:04:09 +02:00
parent 888c1f2a5f
commit bcb5901dbf
3 changed files with 8 additions and 8 deletions

View File

@@ -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")

View File

@@ -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):

View File

@@ -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):