Skip to content

Commit 9787abf

Browse files
committed
Provide default for LOG_DIR
1 parent 6ddaca9 commit 9787abf

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/util/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
REPLAY_DIR = os.path.join(APPDATA_DIR, "replays")
8484

8585
# This contains all Lobby, Chat and Game logs
86-
LOG_DIR = Settings.get("client/logs/path")
86+
LOG_DIR = Settings.get("client/logs/path", default=os.path.join(APPDATA_DIR, "logs"))
8787
LOG_FILE_FAF = os.path.join(LOG_DIR, 'forever.log')
8888
LOG_FILE_MAPGEN = os.path.join(LOG_DIR, 'map_generator.log')
8989
LOG_FILE_GAME_PREFIX = os.path.join(LOG_DIR, 'game')

src/util/settings_menus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def load_general_options(self) -> None:
300300

301301
with Settings.group("client/logs") as group:
302302
self.checkFileLog.setChecked(group.value("enable", True, type=bool))
303-
self.lineFileLogPath.setText(group.value("path"))
303+
self.lineFileLogPath.setText(group.value("path", util.LOG_DIR))
304304
self.comboLogLevel.setCurrentIndex(
305305
self.comboLogLevel.findData(group.value("level", logging.INFO, type=int)),
306306
)

0 commit comments

Comments
 (0)