diff --git a/resources/DirectoryLister.php b/resources/DirectoryLister.php index d5dd038..d196fd1 100644 --- a/resources/DirectoryLister.php +++ b/resources/DirectoryLister.php @@ -126,12 +126,12 @@ class DirectoryLister { } else { - // zip the stuff (dir and all in there) into the tmp_zip file - exec('zip -' . $this->_config['zip_compression_level'] . ' -r ' . $tmp_zip . ' * -x ' . $exclude_list); - // get a tmp name for the .zip $tmp_zip = tempnam('tmp', 'tempzip') . '.zip'; + // zip the stuff (dir and all in there) into the tmp_zip file + exec('zip -' . $this->_config['zip_compression_level'] . ' -r ' . $tmp_zip . ' * -x ' . $exclude_list); + // calc the length of the zip. it is needed for the progress bar of the browser $filesize = filesize($tmp_zip); header("Content-Length: $filesize");