Skip to content

Commit

Permalink
version 0.29.1
Browse files Browse the repository at this point in the history
  • Loading branch information
FriendsOfGalaxy committed Jul 22, 2019
1 parent dc42ed9 commit 157421d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/local_games.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def get_app_states_from_registry(app_dict):

def local_games_list():
library_folders = get_library_folders()
logging.debug("Checking library folders: %s", str(library_folders))
apps_ids = get_installed_games(library_folders)
app_states = get_app_states_from_registry(registry_apps_as_dict())
local_games = []
Expand Down Expand Up @@ -154,15 +155,15 @@ def get_configuration_folder():
def get_custom_library_folders(config_path: str) -> List[str]:
"""Parses library folders config file and returns a list of folders paths"""
try:
config = vdf.load(open(config_path), mapper=CaseInsensitiveDict)
config = vdf.load(open(config_path, encoding="utf-8"), mapper=CaseInsensitiveDict)
result = []
for i in itertools.count(1):
library_folders = config["LibraryFolders"]
key = str(i)
library_folder = library_folders.get(key)
if library_folder is None:
break
result.append(library_folder)
result.append(os.path.join(library_folder, "steamapps"))

return result
except (FileNotFoundError, SyntaxError, KeyError):
Expand Down
2 changes: 1 addition & 1 deletion src/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.29"
__version__ = "0.29.1"
4 changes: 2 additions & 2 deletions tests/test_local_games.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ def test_get_custom_library_folders(tmp_path):
path.write_text(dedent(data))
library_folders = get_custom_library_folders(path)
assert library_folders == [
r"D:\Steam",
r"E:\Games\Steam"
os.path.join(r"D:\Steam", "steamapps"),
os.path.join(r"E:\Games\Steam", "steamapps")
]


Expand Down

0 comments on commit 157421d

Please sign in to comment.