aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2013-02-23 14:38:29 -0800
committerMichael Gapczynski <mtgap@owncloud.com>2013-02-23 14:38:29 -0800
commit069adf86f2a6ee7ab4edaf3e350b76baee620782 (patch)
treefdf7c60e56f0a498afa0a4d1b427ffd35b40f173
parenta417028ccd3f38a0afd85bebb3bea8d6914bb88f (diff)
parentd29c2b016921176a10d348e26c3f045431ff7bc0 (diff)
downloadnextcloud-server-069adf86f2a6ee7ab4edaf3e350b76baee620782.tar.gz
nextcloud-server-069adf86f2a6ee7ab4edaf3e350b76baee620782.zip
Merge pull request #1879 from owncloud/fix-webdav-quota
Don't throw insufficient storage exception if free space is unknown
-rw-r--r--lib/connector/sabre/quotaplugin.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/connector/sabre/quotaplugin.php b/lib/connector/sabre/quotaplugin.php
index ce9a968eb3c..c80a33d04b1 100644
--- a/lib/connector/sabre/quotaplugin.php
+++ b/lib/connector/sabre/quotaplugin.php
@@ -50,7 +50,8 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin {
$uri='/'.$uri;
}
list($parentUri, $newName) = Sabre_DAV_URLUtil::splitPath($uri);
- if ($length > \OC\Files\Filesystem::free_space($parentUri)) {
+ $freeSpace = \OC\Files\Filesystem::free_space($parentUri);
+ if ($freeSpace !== \OC\Files\FREE_SPACE_UNKNOWN && $length > $freeSpace) {
throw new Sabre_DAV_Exception_InsufficientStorage();
}
}