From 59b14512cd3fa462303723320b5ec0ca4520f5f3 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Tue, 26 Aug 2014 12:42:00 +0000 Subject: [PATCH] * Mail: fix for failed zip-download when users startfolder is not writeable Reason: get_home_dir may fetch the users startfolder if set; if not writeable, action will fail --- mail/inc/class.mail_ui.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 60568df157..0e098a0435 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -2616,7 +2616,9 @@ class mail_ui // put them in VFS so they can be zipped $header = $this->mail_bo->getMessageHeader($message_id,'',true,false,$mailbox); - $temp_path = egw_vfs::get_home_dir() . "/.mail_$message_id"; + //get_home_dir may fetch the users startfolder if set; if not writeable, action will fail. TODO: use temp_dir + $homedir = '/home/'.$GLOBALS['egw_info']['user']['account_lid']; + $temp_path = $homedir/*egw_vfs::get_home_dir()*/ . "/.mail_$message_id"; if(egw_vfs::is_dir($temp_path)) egw_vfs::remove ($temp_path); // Add subject to path, so it gets used as the file name