From d93019125cca783e8acfaa68467024375321e55f Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 28 Oct 2014 07:20:00 -0400
Subject: [PATCH] Allways call rcube_imap::set_folder() before rcube_imap::get_message_part()

---
 program/lib/Roundcube/rcube_message.php |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/program/lib/Roundcube/rcube_message.php b/program/lib/Roundcube/rcube_message.php
index d089713..3644d6b 100644
--- a/program/lib/Roundcube/rcube_message.php
+++ b/program/lib/Roundcube/rcube_message.php
@@ -222,6 +222,7 @@
 
         // part body not fetched yet... save in memory if it's small enough
         if ($part->body === null && is_numeric($mime_id) && $part->size < self::BODY_MAX_SIZE) {
+            $this->storage->set_folder($this->folder);
             // Warning: body here should be always unformatted
             $part->body = $this->storage->get_message_part($this->uid, $mime_id, $part,
                 null, null, true, 0, false);

--
Gitblit v1.9.1