Skip to content

Commit

Permalink
Fixed a bug in AttachmentDownloadManagerService.| #372
Browse files Browse the repository at this point in the history
  • Loading branch information
DenBond7 committed May 25, 2021
1 parent 4dedb27 commit 2401ad6
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -659,8 +659,6 @@ class AttachmentDownloadManagerService : Service() {

FileInputStream(file).use { inputStream ->
val decryptedFile = File.createTempFile("tmp", null, context.externalCacheDir)
att.name = FilenameUtils.getBaseName(att.name)

val pgpSecretKeyRings = KeysStorageImpl.getInstance(context).getPGPSecretKeyRings()
val pgpSecretKeyRingCollection = PGPSecretKeyRingCollection(pgpSecretKeyRings)
val protector = KeysStorageImpl.getInstance(context).getSecretKeyRingProtector()
Expand All @@ -673,6 +671,7 @@ class AttachmentDownloadManagerService : Service() {
protector = protector
)

att.name = FilenameUtils.getBaseName(att.name)
result.fileInfo?.fileName?.let { fileName ->
if (att.name == null) {
att.name = fileName
Expand Down

0 comments on commit 2401ad6

Please sign in to comment.