Skip to content

Commit

Permalink
Ensure to only update size if available
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Oct 14, 2022
1 parent 15e43c8 commit b6290c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/dav/lib/Connector/Sabre/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ public function put($data) {
}

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

try {
$this->changeLock(ILockingProvider::LOCK_SHARED);
Expand Down

0 comments on commit b6290c2

Please sign in to comment.