]> source.dussan.org Git - nextcloud-server.git/commitdiff
Don't throw insufficient storage exception if free space is unknown
authorMichael Gapczynski <mtgap@owncloud.com>
Sat, 23 Feb 2013 20:37:44 +0000 (15:37 -0500)
committerMichael Gapczynski <mtgap@owncloud.com>
Sat, 23 Feb 2013 20:37:44 +0000 (15:37 -0500)
lib/connector/sabre/quotaplugin.php

index ce9a968eb3ca2eabe17e5fe8d01fec416d739394..233159e36461384e74031d88698f0f1ace4bcd90 100644 (file)
@@ -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 > \OC\Files\Filesystem::free_space($parentUri)) {
                                throw new Sabre_DAV_Exception_InsufficientStorage();
                        }
                }