Skip to content

Commit

Permalink
Merge pull request #74 from nextcloud/bugfix/2352/zip64-central-direc…
Browse files Browse the repository at this point in the history
…tory-length

Patch ZipStreamer to fix directory downloads
  • Loading branch information
MorrisJobke authored Jan 10, 2018
2 parents 696f768 + 4ec6dd6 commit 3cec97e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mcnetic/zipstreamer/src/ZipStreamer.php
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ private function buildCentralDirectoryHeader($filePath, $timestamp, $gpFlags,
private function buildEndOfCentralDirectoryRecord($cdRecLength) {
if ($this->zip64) {
$diskNumber = -1;
$cdRecCount = -1;
$cdRecCount = min(sizeof($this->cdRec), 0xffff);
$cdRecLength = -1;
$offset = -1;
} else {
Expand Down
1 change: 1 addition & 0 deletions patches.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Patches:
- SabreXML: Fix invalid PHP docs https://github.com/fruux/sabre-xml/pull/128
- php-opencloud: Fix invalid PHP docs https://github.com/rackspace/php-opencloud/pull/711
- SabreXML: Prevent infinite loops for empty props element https://github.com/fruux/sabre-xml/pull/132
- ZipStreamer: Fix zip generation for 7zip https://github.com/McNetic/PHPZipStreamer/pull/39

0 comments on commit 3cec97e

Please sign in to comment.