From fb86a007b249011030dfcaf144f934de868f30d7 Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 19 Aug 2024 22:52:18 +0200 Subject: [PATCH] Log to local dir in Windows by default --- npbackup/__main__.py | 2 +- npbackup/gui/__main__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/npbackup/__main__.py b/npbackup/__main__.py index debae29..2d44f11 100644 --- a/npbackup/__main__.py +++ b/npbackup/__main__.py @@ -286,7 +286,7 @@ This is free software, and you are welcome to redistribute it under certain cond log_file = args.log_file else: if os.name == "nt": - log_file = os.path.join(gettempdir(), "{}.log".format(__intname__)) + log_file = os.path.join(CURRENT_DIR, "{}.log".format(__intname__)) else: log_file = "/var/log/{}.log".format(__intname__) diff --git a/npbackup/gui/__main__.py b/npbackup/gui/__main__.py index 4c2cf10..41684bb 100644 --- a/npbackup/gui/__main__.py +++ b/npbackup/gui/__main__.py @@ -710,7 +710,7 @@ def _main_gui(viewer_mode: bool): log_file = args.log_file else: if os.name == "nt": - log_file = os.path.join(gettempdir(), "{}.log".format(__intname__)) + log_file = os.path.join(CURRENT_DIR, "{}.log".format(__intname__)) else: log_file = "/var/log/{}.log".format(__intname__) logger = ofunctions.logger_utils.logger_get_logger(log_file, debug=_DEBUG)