diff --git a/src/module/zip.php b/src/module/zip.php index e64cea1..7e11a64 100644 --- a/src/module/zip.php +++ b/src/module/zip.php @@ -208,7 +208,8 @@ class zip extends Action return; } @set_time_limit(300); - $zip = new zip\Zip($path); + $fp = fopen($path, 'wb'); + $zip = new zip\Zip($fp); foreach ($exclude as $e) { $e = '#(^|/)(' . str_replace( ['.', '*'], @@ -223,6 +224,7 @@ class zip extends Action true ); $zip->close(); + $zip->write(); unset($zip); $this->setSuccess(sprintf(__('Zip module into "%s"'), $path)); diff --git a/src/module/zip/Zip.php b/src/module/zip/Zip.php index c533d42..a281006 100644 --- a/src/module/zip/Zip.php +++ b/src/module/zip/Zip.php @@ -24,9 +24,10 @@ class Zip extends \Dotclear\Helper\File\Zip\Zip * * @param string $name The name * @param string $file The file + * @param string $size The size * @param int|null $mtime The mtime */ - protected function writeFile(string $name, string $file, ?int $mtime) + protected function writeFile($name, $file, $size, $mtime) { if (!isset($this->entries[$name])) { return;