[pgp] Fixed file sharing feature

The encrypt_file method from PGP module needed a stream instead of
bytes
This commit is contained in:
XutaxKamay authored and lovetox committed 2021-04-25 13:33:05 +02:00
1 parent d349e5bf44
commit 96d4f5e2b5
1 file changed
+4 -1
+4 -1
View File
@@ -281,8 +281,11 @@ class PGPLegacy(BaseModule):
self._log.warning(error)
return
encrypted = self._pgp.encrypt_file(file.get_data(),
stream = open(file.path, "rb")
encrypted = self._pgp.encrypt_file(stream,
[key_id, own_key_id])
stream.close()
if not encrypted:
GLib.idle_add(self._on_file_encryption_error, encrypted.status)
return