mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 01:45:28 +00:00
[core] Simplify game installation directory code
This commit is contained in:
parent
c2ae5b7367
commit
988be667df
|
@ -353,15 +353,13 @@ class LegendaryCore:
|
||||||
base_path = self.get_default_install_dir()
|
base_path = self.get_default_install_dir()
|
||||||
|
|
||||||
if game.is_dlc:
|
if game.is_dlc:
|
||||||
install_path = os.path.join(
|
game_folder = base_game.metadata.get('customAttributes', {}).\
|
||||||
base_path,
|
get('FolderName', {}).get('value', base_game.app_name)
|
||||||
base_game.metadata.get('customAttributes', {}).get('FolderName', {}).get('value', game.app_name)
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
install_path = os.path.join(
|
game_folder = game.metadata.get('customAttributes', {}).\
|
||||||
base_path,
|
get('FolderName', {}).get('value', game.app_name)
|
||||||
game.metadata.get('customAttributes', {}).get('FolderName', {}).get('value', game.app_name)
|
|
||||||
)
|
install_path = os.path.join(base_path, game_folder)
|
||||||
|
|
||||||
if not os.path.exists(install_path):
|
if not os.path.exists(install_path):
|
||||||
os.makedirs(install_path)
|
os.makedirs(install_path)
|
||||||
|
|
Loading…
Reference in a new issue