Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
255e4fe3 by wurstsalat at 2025-07-08T22:00:17+02:00
fix: Preview: Guard file access checks
Fixes #12361
- - - - -
1 changed file:
- gajim/common/preview.py
Changes:
=====================================
gajim/common/preview.py
=====================================
@@ -168,13 +168,23 @@ def is_aes_encrypted(self) -> bool:
def thumb_exists(self) -> bool:
if self.thumb_path is None:
return False
- return self.thumb_path.exists()
+
+ try:
+ return self.thumb_path.exists()
+ except Exception as error:
+ log.error("Could not check if thumbnail exists: %s", error)
+ return False
@property
def orig_exists(self) -> bool:
if self.orig_path is None:
return False
- return self.orig_path.exists()
+
+ try:
+ return self.orig_path.exists()
+ except Exception as error:
+ log.error("Could not check if original file exists: %s", error)
+ return False
def update_widget(self, data: bytes | None = None) -> None:
self._widget.update(self, data)
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/255e4fe3ba5460ba623bd67bc1e4f7a9f8613d9e
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/255e4fe3ba5460ba623bd67bc1e4f7a9f8613d9e
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]