aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/dav/lib/Upload/AssemblyStream.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/dav/lib/Upload/AssemblyStream.php b/apps/dav/lib/Upload/AssemblyStream.php
index ef6d39974c0..c8f98c7642f 100644
--- a/apps/dav/lib/Upload/AssemblyStream.php
+++ b/apps/dav/lib/Upload/AssemblyStream.php
@@ -153,10 +153,14 @@ class AssemblyStream implements \Icewind\Streams\File {
$this->currentNodeRead += $read;
if (feof($this->currentStream)) {
+ $streamStat = fstat($this->currentStream);
fclose($this->currentStream);
$currentNodeSize = $this->nodes[$this->currentNode]->getSize();
if ($this->currentNodeRead < $currentNodeSize) {
- throw new \Exception('Stream from assembly node shorter than expected, got ' . $this->currentNodeRead . ' bytes, expected ' . $currentNodeSize);
+ throw new \Exception('Stream from assembly node shorter than expected, got ' .
+ $this->currentNodeRead . ' bytes, node size is reported as ' .
+ $currentNodeSize . 'B, stream is reported as ' . $streamStat['size'] . 'B'
+ );
}
$this->currentNode++;
$this->currentNodeRead = 0;