Fix download zip when using windows see BT#10254

1.10.x
Julio Montoya 10 years ago
parent 22dc909a38
commit 56504c645d
  1. 7
      main/document/downloadfolder.inc.php

@ -91,7 +91,6 @@ function fixDocumentNameCallback($p_event, &$p_header)
);
// Changes file.phps to file.php
$basename = basename($documentNameFixed);
$basenamePHPFixed = str_replace('.phps', '.php', $basename);
$documentNameFixed = str_replace(
@ -100,7 +99,11 @@ function fixDocumentNameCallback($p_event, &$p_header)
$documentNameFixed
);
$documentNameFixed = str_replace($remove_dir, '/', $documentNameFixed);
if ($remove_dir != '/') {
$documentNameFixed = str_replace($remove_dir, '/', $documentNameFixed);
} else {
$documentNameFixed = ltrim($documentNameFixed, '/');
}
$p_header['stored_filename'] = $documentNameFixed;
return 1;

Loading…
Cancel
Save