mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:07 +01:00
Fix downloading attachments as zip from mail with a colon (:) in the subject failed
This commit is contained in:
parent
acfcd24983
commit
f8c8d1d84c
@ -2915,11 +2915,12 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
||||
$temp_path = $homedir/*Vfs::get_home_dir()*/ . "/.mail_$message_id";
|
||||
if(Vfs::is_dir($temp_path)) Vfs::remove ($temp_path);
|
||||
|
||||
// Add subject to path, so it gets used as the file name
|
||||
$path = $temp_path . '/' . ($header['SUBJECT'] ? Vfs::encodePathComponent($header['SUBJECT']) : lang('mail')) .'/';
|
||||
// Add subject to path, so it gets used as the file name, replacing ':'
|
||||
// as it seems to cause an error
|
||||
$path = $temp_path . '/' . ($header['SUBJECT'] ? Vfs::encodePathComponent(str_replace(':','-', $header['SUBJECT'])) : lang('mail')) .'/';
|
||||
if(!Vfs::mkdir($path, 0700, true))
|
||||
{
|
||||
Framework::message("Unable to open temp directory $path",'error');
|
||||
echo "Unable to open temp directory $path";
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user