]> source.dussan.org Git - nextcloud-server.git/commitdiff
Reuse $freeSpace variable
authorMichael Gapczynski <mtgap@owncloud.com>
Sat, 23 Feb 2013 21:00:50 +0000 (16:00 -0500)
committerMichael Gapczynski <mtgap@owncloud.com>
Sat, 23 Feb 2013 21:00:50 +0000 (16:00 -0500)
lib/connector/sabre/quotaplugin.php

index 233159e36461384e74031d88698f0f1ace4bcd90..c80a33d04b1e80b5625ec7fbf93ac748bdc4fd3c 100644 (file)
@@ -51,7 +51,7 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin {
                        }
                        list($parentUri, $newName) = Sabre_DAV_URLUtil::splitPath($uri);
                        $freeSpace = \OC\Files\Filesystem::free_space($parentUri);
-                       if ($freeSpace !== \OC\Files\FREE_SPACE_UNKNOWN && $length > \OC\Files\Filesystem::free_space($parentUri)) {
+                       if ($freeSpace !== \OC\Files\FREE_SPACE_UNKNOWN && $length > $freeSpace) {
                                throw new Sabre_DAV_Exception_InsufficientStorage();
                        }
                }