Merge pull request #21492 from atm-GregM/FIX_dol_compress_dir_relativePath
FIX dol_compress_dir names files on archives
This commit is contained in:
commit
c21597e839
@ -2193,7 +2193,7 @@ function dol_compress_dir($inputdir, $outputfile, $mode = "zip", $excludefiles =
|
|||||||
if (!$file->isDir()) {
|
if (!$file->isDir()) {
|
||||||
// Get real and relative path for current file
|
// Get real and relative path for current file
|
||||||
$filePath = $file->getRealPath();
|
$filePath = $file->getRealPath();
|
||||||
$relativePath = ($rootdirinzip ? $rootdirinzip.'/' : '').substr($filePath, strlen($inputdir) + 1);
|
$relativePath = ($rootdirinzip ? $rootdirinzip.'/' : '').substr($filePath, strlen(realpath($inputdir)) + 1);
|
||||||
|
|
||||||
if (empty($excludefiles) || !preg_match($excludefiles, $filePath)) {
|
if (empty($excludefiles) || !preg_match($excludefiles, $filePath)) {
|
||||||
// Add current file to archive
|
// Add current file to archive
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user