From aba2dc0df5c50c244904f2b1bb458334a851d426 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Thu, 30 Apr 2026 18:32:24 -0500 Subject: Clean up empty dirs left by VFS, suppress noisy Qt debug Fixes #64: VFS now tracks the directories it creates outside the data dir (external mappings + RootBuilder game-root deploys) and removes them on unmount, but only if still empty. Pre-existing user dirs and the game root itself are never touched. RootBuilder manifest gains a "dirs" field so the cleanup survives a crashed session. Also drops a Path-repr qDebug in bg3_file_mapper that crashed Qt's logger on surrogate-escaped paths, and defaults QT_LOGGING_RULES to default.debug=false in the launcher and AppRun (still overridable) so the same class of plugin bug stays muted in shipped builds. Co-Authored-By: Claude Opus 4.7 (1M context) --- libs/basic_games/games/baldursgate3/bg3_file_mapper.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'libs') diff --git a/libs/basic_games/games/baldursgate3/bg3_file_mapper.py b/libs/basic_games/games/baldursgate3/bg3_file_mapper.py index e2c54e9..cb6dd21 100644 --- a/libs/basic_games/games/baldursgate3/bg3_file_mapper.py +++ b/libs/basic_games/games/baldursgate3/bg3_file_mapper.py @@ -4,7 +4,7 @@ import platform from pathlib import Path from typing import Callable, Optional -from PyQt6.QtCore import QDir, QLoggingCategory, qDebug, qInfo, qWarning +from PyQt6.QtCore import QDir, qDebug, qInfo, qWarning from PyQt6.QtWidgets import QApplication import mobase @@ -71,11 +71,6 @@ class BG3FileMapper(mobase.IPluginFileMapper): progress.setValue(len(active_mods) + 1) QApplication.processEvents() progress.close() - cat = QLoggingCategory.defaultCategory() - if cat is not None and cat.isDebugEnabled(): - qDebug( - f"resolved mappings: { {m.source: m.destination for m in self.current_mappings} }" - ) return self.current_mappings def map_files( -- cgit v1.3.1