]> source.dussan.org Git - nextcloud-server.git/commitdiff
Return null if file size is negative for WebDAV, fix #2013
authorMichael Gapczynski <mtgap@owncloud.com>
Mon, 27 May 2013 15:35:31 +0000 (11:35 -0400)
committerVictor Dubiniuk <victor.dubiniuk@gmail.com>
Sat, 3 Aug 2013 12:39:40 +0000 (15:39 +0300)
lib/connector/sabre/file.php

index 438d9871c228ef83851f87bf2497112b35528d46..06ab73e3e4d11c95d9dd1e2f9958e3da24739e60 100644 (file)
@@ -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;
+               }
        }
 
        /**