Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion games/baldursgate3/bg3_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ def retrieve_mod_metadata_in_new_thread(mod: mobase.IModInterface):
if mod.name() in metadata
)
+ self._mod_settings_xml_end
)
),
encoding="utf-8",
)
qInfo(
f"backing up generated file {self.modsettings_path} to {self.modsettings_backup}, "
Expand Down
14 changes: 4 additions & 10 deletions games/game_baldursgate3.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,7 @@ def _on_finished_run(self, exec_path: str, exit_code: int):
moved: dict[str, str] = {}
for path in self.utils.overwrite_path.rglob("*.log"):
try:
moved[str(path.relative_to(Path.home()))] = str(
(self.utils.log_dir / path.name).relative_to(Path.home())
)
moved[str(path)] = str((self.utils.log_dir / path.name))
path.replace(self.utils.log_dir / path.name)
except PermissionError as e:
qDebug(str(e))
Expand All @@ -201,9 +199,7 @@ def _on_finished_run(self, exec_path: str, exit_code: int):
if path.name == "log.txt":
dest = self.utils.log_dir / f"{path.parent.name}-{path.name}"
try:
moved[str(path.relative_to(Path.home()))] = str(
dest.relative_to(Path.home())
)
moved[str(path)] = str(dest)
path.replace(dest)
except PermissionError as e:
qDebug(str(e))
Expand All @@ -230,10 +226,8 @@ def _on_finished_run(self, exec_path: str, exit_code: int):
for folder in sorted(list(fdir.walk(top_down=False)))[:-1]:
try:
folder[0].rmdir()
removed.add(folder[0].relative_to(Path.home()))
removed.add(folder[0])
except OSError:
pass
if cat is not None and cat.isDebugEnabled() and len(removed) > 0:
qDebug(
f"cleaned empty dirs from {fdir.relative_to(Path.home())} {removed}"
)
qDebug(f"cleaned empty dirs from {fdir} {removed}")
4 changes: 1 addition & 3 deletions games/game_divinityoriginalsin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ class DivinityOriginalSinGame(BasicGame):
def init(self, organizer: mobase.IOrganizer):
super().init(organizer)
self._register_feature(
BasicGameSaveGameInfo(
lambda s: s.with_suffix(".png") # Not confirmed
)
BasicGameSaveGameInfo(lambda s: s.with_suffix(".png")) # Not confirmed
)
return True
Loading