summaryrefslogtreecommitdiffstats
path: root/lib/connector/sabre
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-05-27 11:35:31 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2013-05-27 11:35:31 -0400
commit0953b68556152187ed305323b64b186cc21c2ade (patch)
tree4eb2e61546f6a0be53a71f2eaa1c594b42a2097e /lib/connector/sabre
parentc41305d46764c0695ac5d0a942c22e56cecac3f0 (diff)
downloadnextcloud-server-0953b68556152187ed305323b64b186cc21c2ade.tar.gz
nextcloud-server-0953b68556152187ed305323b64b186cc21c2ade.zip
Return null if file size is negative for WebDAV, fix #2013
Diffstat (limited to 'lib/connector/sabre')
-rw-r--r--lib/connector/sabre/file.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/connector/sabre/file.php b/lib/connector/sabre/file.php
index 91646312e90..617be508b16 100644
--- a/lib/connector/sabre/file.php
+++ b/lib/connector/sabre/file.php
@@ -106,8 +106,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;
+ }
}
/**