From 43fcf5bce7fb17976496fcaa127b0cada904e529 Mon Sep 17 00:00:00 2001 From: Caio Nardi Date: Tue, 22 May 2018 10:37:15 -0300 Subject: [PATCH] Fix checking duplicated names in the zip file (#6302) --- plugins/zipdownload/zipdownload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/zipdownload/zipdownload.php b/plugins/zipdownload/zipdownload.php index 2763228fa..d6fbefefd 100644 --- a/plugins/zipdownload/zipdownload.php +++ b/plugins/zipdownload/zipdownload.php @@ -213,7 +213,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;