From df693526027af82d750d4b98a4ec75c33db33182 Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Tue, 4 Apr 2023 20:10:33 +0200 Subject: [PATCH] Set itch Windows location --- src/utils/heroic_parser.py | 2 +- src/utils/itch_parser.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/heroic_parser.py b/src/utils/heroic_parser.py index 663eb02..7f27d57 100644 --- a/src/utils/heroic_parser.py +++ b/src/utils/heroic_parser.py @@ -44,7 +44,7 @@ def heroic_parser(parent_widget): ) elif os.name == "nt" and (Path(os.getenv("appdata")) / "heroic").exists(): schema.set_string( - "heroic-location", str(Path(os.getenv("appdata") / "heroic")) + "heroic-location", str(Path(os.getenv("appdata")) / "heroic") ) else: return diff --git a/src/utils/itch_parser.py b/src/utils/itch_parser.py index ce7d46a..dcf4fa2 100644 --- a/src/utils/itch_parser.py +++ b/src/utils/itch_parser.py @@ -17,6 +17,7 @@ # # SPDX-License-Identifier: GPL-3.0-or-later +import os import urllib.request from pathlib import Path from shutil import copyfile @@ -120,6 +121,8 @@ def itch_parser(parent_widget): schema.set_string("itch-location", "~/.var/app/io.itch.itch/config/itch/") elif (parent_widget.config_dir / "itch").exists(): schema.set_string("itch-location", str(parent_widget.config_dir / "itch")) + elif os.name == "nt" and (Path(os.getenv("appdata")) / "itch").exists(): + schema.set_string("itch-location", str(Path(os.getenv("appdata")) / "itch")) else: return