Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit cf8ddb3

Browse files
committed
BUG: refs #974. Change "large" file threshold for zipstreaming
This makes it much less likely that a folder with a huge number of items will cause out of memory crashes. It could still happen though; thus is the nature of zip streaming.
1 parent 810c633 commit cf8ddb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/ZipStream/ZipStream.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ function __construct($name = null, $opt = array()) {
155155
# save options
156156
$this->opt = $opt;
157157

158-
# set large file defaults: size = 20 megabytes, method = store
158+
# set large file defaults: size = 3 megabytes, method = store
159159
if (!isset($this->opt['large_file_size']))
160-
$this->opt['large_file_size'] = 20 * 1024 * 1024;
160+
$this->opt['large_file_size'] = 3 * 1024 * 1024;
161161
if (!isset($this->opt['large_file_method']))
162162
$this->opt['large_file_method'] = 'store';
163163

0 commit comments

Comments
 (0)