From 191beed12e732fea678737ae0a9618c49b891bdf Mon Sep 17 00:00:00 2001 From: kramo Date: Thu, 17 Aug 2023 13:52:56 +0200 Subject: [PATCH] Use shared.home consistently --- src/game.py | 2 +- src/importer/sources/heroic_source.py | 2 +- src/utils/migrate_files_v1_to_v2.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game.py b/src/game.py index e144460..8dc981e 100644 --- a/src/game.py +++ b/src/game.py @@ -128,7 +128,7 @@ class Game(Gtk.Box): # pylint: disable=consider-using-with subprocess.Popen( args, - cwd=Path.home(), + cwd=shared.home, shell=True, start_new_session=True, creationflags=subprocess.CREATE_NEW_PROCESS_GROUP if os.name == "nt" else 0, # type: ignore diff --git a/src/importer/sources/heroic_source.py b/src/importer/sources/heroic_source.py index 42dc446..f31bbe7 100644 --- a/src/importer/sources/heroic_source.py +++ b/src/importer/sources/heroic_source.py @@ -241,7 +241,7 @@ class LegendaryIterable(StoreSubSourceIterable): else: # Heroic native logging.debug("Using Heroic native <= 2.8 legendary file") - path = Path.home() / ".config" + path = shared.home / ".config" path = path / "legendary" / "installed.json" logging.debug("Using Heroic %s installed.json path %s", self.name, path) diff --git a/src/utils/migrate_files_v1_to_v2.py b/src/utils/migrate_files_v1_to_v2.py index 9405a7a..41c166b 100644 --- a/src/utils/migrate_files_v1_to_v2.py +++ b/src/utils/migrate_files_v1_to_v2.py @@ -23,7 +23,7 @@ from pathlib import Path from src import shared -old_data_dir = Path.home() / ".local" / "share" +old_data_dir = shared.home / ".local" / "share" old_cartridges_data_dir = old_data_dir / "cartridges" migrated_file_path = old_cartridges_data_dir / ".migrated" old_games_dir = old_cartridges_data_dir / "games"