Fix checking duplicated names in the zip file (#6302)

pull/6465/head
Caio Nardi 7 years ago committed by Aleksander Machniak
parent 5f444885b8
commit e4cee31a54

@ -210,7 +210,7 @@ class zipdownload extends rcube_plugin
* Adding a number before dot of extension on a name of file with same name on zip
* Ext: attach(1).txt on attach filename that has a attach.txt filename on same zip
*/
if (isset($this->name[$displayname])) {
if (isset($this->names[$displayname])) {
list($filename, $ext) = preg_split("/\.(?=[^\.]*$)/", $displayname);
$displayname = $filename . '(' . ($this->names[$displayname]++) . ').' . $ext;
$this->names[$displayname] = 1;

Loading…
Cancel
Save