Use the full path when reading in EncryptedUpload

Calling ``matrix_upload.py --encrypt`` with a filename outside of the
current directory fails due to a typo in EncryptedUpload which uses the
basename of the file instead of the original/full path.
This commit is contained in:
Yuri D'Elia 2021-06-02 11:51:17 +02:00
parent 04be5a8764
commit a4efd87e50

View file

@ -113,7 +113,7 @@ class EncryptedUpload(Upload):
self.source_mimetype = self.mimetype
self.mimetype = "application/octet-stream"
with open(self.filename, "rb") as file:
with open(self.file, "rb") as file:
self.ciphertext, self.file_keys = encrypt_attachment(file.read())
def send_progress(self):