Pathlib fixes

This commit is contained in:
kramo
2023-04-02 08:06:09 +02:00
parent 960eaa1949
commit 7e968a9ac7
3 changed files with 10 additions and 9 deletions

View File

@@ -107,11 +107,11 @@ class CartridgesWindow(Adw.ApplicationWindow):
if "removed" in current_games[current_game]:
(
self.data_dir / "cartridges" / "games" / f"{current_game}.json"
).remove()
).unlink(missing_ok=True)
try:
(
self.data_dir / "cartridges" / "covers" / f"{current_game}.tiff"
).remove()
).unlink(missing_ok=True)
except FileNotFoundError:
pass