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:
parent
04be5a8764
commit
a4efd87e50
1 changed files with 1 additions and 1 deletions
|
@ -113,7 +113,7 @@ class EncryptedUpload(Upload):
|
||||||
self.source_mimetype = self.mimetype
|
self.source_mimetype = self.mimetype
|
||||||
self.mimetype = "application/octet-stream"
|
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())
|
self.ciphertext, self.file_keys = encrypt_attachment(file.read())
|
||||||
|
|
||||||
def send_progress(self):
|
def send_progress(self):
|
||||||
|
|
Loading…
Reference in a new issue