mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 08:16:43 -04:00
Properly end iterating over the file once the target has been reached
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
b2072cd6fc
commit
fc2e09b667
1 changed files with 1 additions and 1 deletions
|
|
@ -456,7 +456,7 @@ class View {
|
|||
// forward file handle via chunked fread because fseek seem to have failed
|
||||
|
||||
$end = $from + 1;
|
||||
while (!feof($handle) && ftell($handle) < $end) {
|
||||
while (!feof($handle) && ftell($handle) < $end && ftell($handle) !== $from) {
|
||||
$len = $from - ftell($handle);
|
||||
if ($len > $chunkSize) {
|
||||
$len = $chunkSize;
|
||||
|
|
|
|||
Loading…
Reference in a new issue