mirror of
https://github.com/netinvent/npbackup.git
synced 2024-09-21 07:16:16 +08:00
Fix --config-file parameter should be a Path
This commit is contained in:
parent
47b3cd9390
commit
302c3910db
|
@ -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():
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in a new issue