Daniel Brötzmann pushed to branch master at gajim / gajim


Commits:
9483a7c3 by wurstsalat at 2022-08-16T17:06:06+02:00
fix: Preview: Don’t fail if thumb file already exists

Fixes #11091

- - - - -


1 changed file:

- gajim/common/preview.py


Changes:

=====================================
gajim/common/preview.py
=====================================
@@ -531,7 +531,10 @@ def _on_thumb_write_finished(_result: bool,
 
         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)
 



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/9483a7c33c319ab1ccff9ba589f7c3b3c2cd11cf

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/9483a7c33c319ab1ccff9ba589f7c3b3c2cd11cf
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
Commits@gajim.org
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to