[game-data-packager] 09/24: adjust Steam directory location to find ~/.steam/steam/steamapps
Simon McVittie
smcv at debian.org
Sat Jan 17 23:28:50 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit c75fa4d1bfb173dc12d6803fce6894a461fbfbfa
Author: Simon McVittie <smcv at debian.org>
Date: Sat Jan 17 21:38:07 2015 +0000
adjust Steam directory location to find ~/.steam/steam/steamapps
---
lib/game_data_packager/__init__.py | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/lib/game_data_packager/__init__.py b/lib/game_data_packager/__init__.py
index 10997b1..07c02ee 100644
--- a/lib/game_data_packager/__init__.py
+++ b/lib/game_data_packager/__init__.py
@@ -1766,22 +1766,28 @@ class GameData(object):
if not os.path.isdir(prefix):
continue
- path = self.steam.get('path')
- if path is not None:
- for middle in ('steamapps', 'SteamApps'):
- path = os.path.join(prefix, middle, path)
+ logger.debug('possible Steam root directory at %s', prefix)
+
+ suffix = self.steam.get('path')
+ if suffix is not None:
+ for middle in ('steamapps', 'steam/steamapps', 'SteamApps',
+ 'steam/SteamApps'):
+ path = os.path.join(prefix, middle, suffix)
if os.path.isdir(path):
- logger.debug('possible Steam installation at %s', path)
+ logger.debug('possible %s found in Steam at %s',
+ self.shortname, path)
yield path
for package in self.packages.values():
- path = package.steam.get('path')
+ suffix = package.steam.get('path')
- if path is not None:
- for middle in ('steamapps', 'SteamApps'):
- path = os.path.join(prefix, middle, path)
+ if suffix is not None:
+ for middle in ('steamapps', 'steam/steamapps', 'SteamApps',
+ 'steam/SteamApps'):
+ path = os.path.join(prefix, middle, suffix)
if os.path.isdir(path):
- logger.debug('possible Steam installation at %s', path)
+ logger.debug('possible %s found in Steam at %s',
+ package.name, path)
yield path
def construct_package(self, binary):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list