output stream not closed
This commit is contained in:
parent
2c96a79a08
commit
5e39d3c6fb
|
@ -11,6 +11,7 @@ Improvements 🙌:
|
||||||
Bugfix 🐛:
|
Bugfix 🐛:
|
||||||
- Clear the notification when the event is read elsewhere (#1822)
|
- Clear the notification when the event is read elsewhere (#1822)
|
||||||
- Speakerphone is not used for ringback tone (#1644, #1645)
|
- Speakerphone is not used for ringback tone (#1644, #1645)
|
||||||
|
- Various report of people that cannot play video (#2107)
|
||||||
|
|
||||||
Translations 🗣:
|
Translations 🗣:
|
||||||
-
|
-
|
||||||
|
|
|
@ -144,11 +144,13 @@ internal class DefaultFileService @Inject constructor(
|
||||||
|
|
||||||
if (elementToDecrypt != null) {
|
if (elementToDecrypt != null) {
|
||||||
Timber.v("## FileService: decrypt file")
|
Timber.v("## FileService: decrypt file")
|
||||||
val decryptSuccess = MXEncryptedAttachments.decryptAttachment(
|
val decryptSuccess = destFile.outputStream().buffered().use {
|
||||||
|
MXEncryptedAttachments.decryptAttachment(
|
||||||
source.inputStream(),
|
source.inputStream(),
|
||||||
elementToDecrypt,
|
elementToDecrypt,
|
||||||
destFile.outputStream().buffered()
|
it
|
||||||
)
|
)
|
||||||
|
}
|
||||||
response.close()
|
response.close()
|
||||||
if (!decryptSuccess) {
|
if (!decryptSuccess) {
|
||||||
return@flatMap Try.Failure(IllegalStateException("Decryption error"))
|
return@flatMap Try.Failure(IllegalStateException("Decryption error"))
|
||||||
|
|
Loading…
Reference in New Issue