From 8d761982c58461b1f26f3b71d759c759e73331ac Mon Sep 17 00:00:00 2001 From: oleksandrtkachuk Date: Sat, 17 Oct 2015 00:28:35 +0300 Subject: [PATCH] First assign to var, then use it --- resources/DirectoryLister.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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");