From 7d8820a3b6cd059efae25148d389c20d79ccdce8 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Mon, 14 Sep 2015 16:19:05 +0200 Subject: [PATCH] Fix download see BT#10254 --- main/document/downloadfolder.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main/document/downloadfolder.inc.php b/main/document/downloadfolder.inc.php index d615aedd7d..71c2095b28 100755 --- a/main/document/downloadfolder.inc.php +++ b/main/document/downloadfolder.inc.php @@ -104,6 +104,9 @@ function fixDocumentNameCallback($p_event, &$p_header) if ($remove_dir != '/') { $documentNameFixed = str_replace($remove_dir, '/', $documentNameFixed); + if (substr($documentNameFixed, 0, 1) == '/') { + $documentNameFixed = substr($documentNameFixed, 1, api_strlen($documentNameFixed)); + } } else { $documentNameFixed = ltrim($documentNameFixed, '/'); }