Merge pull request #103 from a1exM8/master

First assign to var, then use it
This commit is contained in:
Chris Kankiewicz
2015-10-16 23:30:38 -07:00

View File

@@ -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");