diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-01-28 13:08:01 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-01-28 13:08:01 +0300 |
commit | b0347bf1cba6aa7e4a784d4962fbb9e06060a241 (patch) | |
tree | 7fff07f820cf565bf73bc57028e7385812d83874 /lib/Controller/MessagesController.php | |
parent | df939b93e2993749fbdb43401acedb7cde1adf00 (diff) |
Fix saving an embedded message to Files
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/Controller/MessagesController.php')
-rwxr-xr-x | lib/Controller/MessagesController.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Controller/MessagesController.php b/lib/Controller/MessagesController.php index 804022b96..2764bbb3c 100755 --- a/lib/Controller/MessagesController.php +++ b/lib/Controller/MessagesController.php @@ -339,7 +339,9 @@ class MessagesController extends Controller { foreach ($attachmentIds as $attachmentId) { $attachment = $mailBox->getAttachment($messageId, $attachmentId); - $fileName = $attachment->getName(); + $fileName = $attachment->getName() ?? $this->l10n->t('Embedded message %s', [ + $attachmentId, + ]) . '.eml'; $fileParts = pathinfo($fileName); $fileName = $fileParts['filename']; $fileExtension = $fileParts['extension']; |