From 2d284df861ed0d0da5e9c36c437c32ba8fbf6e68 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Thu, 14 Aug 2014 09:32:43 -0400
Subject: [PATCH] Don't read attachment contents from cache when downloading. Cache might have line endings converted

---
 program/steps/mail/get.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc
index 8f869c6..b10a052 100644
--- a/program/steps/mail/get.inc
+++ b/program/steps/mail/get.inc
@@ -356,7 +356,7 @@
             }
             // send part as-it-is
             else {
-                if ($part->body) {
+                if ($part->body && empty($plugin['download'])) {
                     header("Content-Length: " . strlen($part->body));
                     echo $part->body;
                     $sent = true;

--
Gitblit v1.9.1