Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwurstsalat <mailtrash@posteo.de>2022-08-16 18:06:03 +0300
committerwurstsalat <mailtrash@posteo.de>2022-08-16 18:06:06 +0300
commit9483a7c33c319ab1ccff9ba589f7c3b3c2cd11cf (patch)
treed80945357c90dc94cc41cc1020d663f64cd8bd59
parentab34cf78070ab9ebb10d0979b84e214f5d9480c9 (diff)
fix: Preview: Don’t fail if thumb file already exists
Fixes #11091
-rw-r--r--gajim/common/preview.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gajim/common/preview.py b/gajim/common/preview.py
index 4f604ddb1..27325dbbe 100644
--- a/gajim/common/preview.py
+++ b/gajim/common/preview.py
@@ -531,7 +531,10 @@ class PreviewManager:
if error is not None:
log.error('%s: %s', preview.thumb_path.name, error)
- return
+ if not preview.thumb_exists:
+ # Generating a preview can fail if the file already exists
+ # Only abort if thumbnail has not been stored in preview
+ return
log.info('Thumbnail stored: %s ', preview.thumb_path.name)