diff --git a/src/importer/sources/location.py b/src/importer/sources/location.py index 545fe08..8374a20 100644 --- a/src/importer/sources/location.py +++ b/src/importer/sources/location.py @@ -1,3 +1,4 @@ +import logging from pathlib import Path from typing import Callable, Mapping, Iterable from os import PathLike @@ -73,7 +74,9 @@ class Location: raise UnresolvableLocationError() # Update the schema with the found candidate - shared.schema.set_string(self.schema_key, str(candidate)) + value = str(candidate) + shared.schema.set_string(self.schema_key, value) + logging.debug("Resolved value for schema key %s: %s", self.schema_key, value) def __getitem__(self, key: str): """Get the computed path from its key for the location""" diff --git a/src/preferences.py b/src/preferences.py index 7515c2f..2944bc8 100644 --- a/src/preferences.py +++ b/src/preferences.py @@ -17,7 +17,7 @@ # # SPDX-License-Identifier: GPL-3.0-or-later -import os +import logging import re from pathlib import Path from shutil import rmtree @@ -267,17 +267,19 @@ class PreferencesWindow(Adw.PreferencesWindow): # Set the schema infix = "-cache" if location == "cache" else "" key = f"{source.id}{infix}-location" - shared.schema.set_string(key, str(path)) + value = str(path) + shared.schema.set_string(key, value) # Update the row self.update_source_action_row_paths(source) + logging.debug("User-set value for schema key %s: %s", key, value) # Bad picked location, inform user else: if location_name == "cache": - title = "Cache not found" + title = "Cache directory not found" subtitle_format = "Select the {} cache directory." else: - title = "Installation not found" + title = "Installation directory not found" subtitle_format = "Select the {} installation directory." dialog = create_dialog( self,