Commit 96d4f5e2 authored by Kamay's avatar Kamay Committed by Philipp Hörist
Browse files

[pgp] Fixed file sharing feature

The encrypt_file method from PGP module needed a stream instead of
bytes
parent d349e5bf
...@@ -281,8 +281,11 @@ class PGPLegacy(BaseModule): ...@@ -281,8 +281,11 @@ class PGPLegacy(BaseModule):
self._log.warning(error) self._log.warning(error)
return 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]) [key_id, own_key_id])
stream.close()
if not encrypted: if not encrypted:
GLib.idle_add(self._on_file_encryption_error, encrypted.status) GLib.idle_add(self._on_file_encryption_error, encrypted.status)
return return
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment