mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-26 13:27:11 +08:00
Fix --config-file parameter should be a Path
This commit is contained in:
parent
47b3cd9390
commit
302c3910db
2 changed files with 2 additions and 2 deletions
|
|
@ -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."
|
msg = f"Config file {args.config_file} cannot be read."
|
||||||
json_error_logging(False, msg, "critical")
|
json_error_logging(False, msg, "critical")
|
||||||
sys.exit(70)
|
sys.exit(70)
|
||||||
CONFIG_FILE = args.config_file
|
CONFIG_FILE = Path(args.config_file)
|
||||||
else:
|
else:
|
||||||
config_file = Path(f"{CURRENT_DIR}/npbackup.conf")
|
config_file = Path(f"{CURRENT_DIR}/npbackup.conf")
|
||||||
if config_file.exists():
|
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)
|
logger = ofunctions.logger_utils.logger_get_logger(log_file, debug=_DEBUG)
|
||||||
|
|
||||||
if args.config_file:
|
if args.config_file:
|
||||||
config_file = args.config_file
|
config_file = Path(args.config_file)
|
||||||
else:
|
else:
|
||||||
config_file = Path(f"{CURRENT_DIR}/npbackup.conf")
|
config_file = Path(f"{CURRENT_DIR}/npbackup.conf")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue