Skip to content

Commit b6290c2

Browse files
committed
Ensure to only update size if available
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 15e43c8 commit b6290c2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/dav/lib/Connector/Sabre/File.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,8 @@ public function put($data) {
366366
}
367367

368368
// since we skipped the view we need to scan and emit the hooks ourselves
369-
$storage->getUpdater()->update($internalPath, null, ($writtenByteCount - $previousFileSize));
369+
$sizeDifference = isset($previousFileSize, $writtenByteCount) ? ($writtenByteCount - $previousFileSize) : null;
370+
$storage->getUpdater()->update($internalPath, null, $sizeDifference);
370371

371372
try {
372373
$this->changeLock(ILockingProvider::LOCK_SHARED);

0 commit comments

Comments
 (0)