Fix --config-file parameter should be a Path

This commit is contained in:
Orsiris de Jong 2024-01-15 01:22:48 +01:00
parent 47b3cd9390
commit 302c3910db
2 changed files with 2 additions and 2 deletions

View file

@ -276,7 +276,7 @@ This is free software, and you are welcome to redistribute it under certain cond
msg = f"Config file {args.config_file} cannot be read."
json_error_logging(False, msg, "critical")
sys.exit(70)
CONFIG_FILE = args.config_file
CONFIG_FILE = Path(args.config_file)
else:
config_file = Path(f"{CURRENT_DIR}/npbackup.conf")
if config_file.exists():

View file

@ -435,7 +435,7 @@ def _main_gui(viewer_mode: bool):
logger = ofunctions.logger_utils.logger_get_logger(log_file, debug=_DEBUG)
if args.config_file:
config_file = args.config_file
config_file = Path(args.config_file)
else:
config_file = Path(f"{CURRENT_DIR}/npbackup.conf")