From: Michael Gapczynski Date: Mon, 27 May 2013 15:35:31 +0000 (-0400) Subject: Return null if file size is negative for WebDAV, fix #2013 X-Git-Tag: v5.0.11~41^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1c3fc3ac765d3755a3e6439a6b8e7b1a2c5b804a;p=nextcloud-server.git Return null if file size is negative for WebDAV, fix #2013 --- diff --git a/lib/connector/sabre/file.php b/lib/connector/sabre/file.php index 438d9871c22..06ab73e3e4d 100644 --- a/lib/connector/sabre/file.php +++ b/lib/connector/sabre/file.php @@ -115,8 +115,11 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D */ public function getSize() { $this->getFileinfoCache(); - return $this->fileinfo_cache['size']; - + if ($this->fileinfo_cache['size'] > -1) { + return $this->fileinfo_cache['size']; + } else { + return null; + } } /**