Skip to content

Commit

Permalink
Merge pull request #15 from Garulf/encode-utf8
Browse files Browse the repository at this point in the history
* Open files in `UTF-8` encoding
  • Loading branch information
Garulf authored Dec 11, 2021
2 parents ea8af58 + bf4567d commit 1e208b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "Steam Search",
"Description": "Search and launch your Steam Game library",
"Author": "Garulf",
"Version": "2.0.2",
"Version": "2.1.0",
"Language": "python",
"Website": "https://github.com/Garulf/Steam-Search",
"IcoPath": "plugin\\icon\\steam-icon.png",
Expand Down
4 changes: 2 additions & 2 deletions plugin/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def libraries(self):
if not libraries_manifest_path.exists():
return []
try:
library_folders = vdf.load(open(libraries_manifest_path, 'r'))
library_folders = vdf.load(open(libraries_manifest_path, 'r', encoding='utf-8', errors='ignore'))
except FileNotFoundError:
pass
else:
Expand Down Expand Up @@ -78,7 +78,7 @@ def games(self):
games = []
for manifest in self._library_path.joinpath(STEAMAPPS_FOLDER).glob('*.acf'):
try:
_game_manifest = vdf.load(open(manifest, 'r'))
_game_manifest = vdf.load(open(manifest, 'r', encoding='utf-8', errors='ignore'))
game = SteamGame(_game_manifest["AppState"]["appid"], _game_manifest["AppState"]["name"], _game_manifest["AppState"]["installdir"], self._steam_path, self._library_path)
except FileNotFoundError:
pass
Expand Down

0 comments on commit 1e208b3

Please sign in to comment.