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


Commits:
c3ccf675 by wurstsalat at 2025-03-09T13:45:09+01:00
fix: Helpers: Check for empty bytes objects when loading file async

Fixes #12220

- - - - -


1 changed file:

- gajim/common/helpers.py


Changes:

=====================================
gajim/common/helpers.py
=====================================
@@ -549,7 +549,8 @@ def _on_load_finished(file: Gio.File,
         except GLib.Error as error:
             callback(None, error, user_data)
         else:
-            callback(contents, None, user_data)
+            # "contents" may be an empty bytes object
+            callback(contents or None, None, user_data)
 
     file = Gio.File.new_for_path(str(path))
     file.load_contents_async(None, _on_load_finished)



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

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/c3ccf6759c87ca316ce9d2e4f930bc2ba9133fd7
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]

Reply via email to