Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/mail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-01-28 13:08:01 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-01-28 13:08:01 +0300
commitb0347bf1cba6aa7e4a784d4962fbb9e06060a241 (patch)
tree7fff07f820cf565bf73bc57028e7385812d83874 /lib/Controller/MessagesController.php
parentdf939b93e2993749fbdb43401acedb7cde1adf00 (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-xlib/Controller/MessagesController.php4
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'];