diff --git a/src/unisync/main.py b/src/unisync/main.py index f77462d..bb64e94 100644 --- a/src/unisync/main.py +++ b/src/unisync/main.py @@ -1,7 +1,6 @@ # Copyright (C) 2025-2026 Paul Retourné # SPDX-License-Identifier: GPL-3.0-or-later -import os from pathlib import Path from unisync.argparser import create_argparser @@ -14,15 +13,15 @@ def main(): parser = create_argparser(unisync_sync, unisync_add, unisync_mount) cli_args = parser.parse_args() - config_path = os.path.expanduser("~/.config/unisync/config.ini") + config_path: Path = Path("~/.config/unisync/config.ini").expanduser() # Check if --config is set - if cli_args.config != None and os.path.isfile(cli_args.config): + if cli_args.config != None and Path(cli_args.config).is_file(): config = load_config(cli_args.config) - elif os.path.isfile(config_path): - config = load_config(config_path) + elif config_path.is_file(): + config = load_config(str(config_path)) else: # TODO replace the next line with something to do if no config file is found - config = load_config(config_path) + config = load_config(str(config_path)) pass # TODO make the command line arguments work and override the config options