Reuse $freeSpace variable
This commit is contained in:
parent
a2d3333a09
commit
d29c2b0169
|
@ -51,7 +51,7 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin {
|
||||||
}
|
}
|
||||||
list($parentUri, $newName) = Sabre_DAV_URLUtil::splitPath($uri);
|
list($parentUri, $newName) = Sabre_DAV_URLUtil::splitPath($uri);
|
||||||
$freeSpace = \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)) {
|
if ($freeSpace !== \OC\Files\FREE_SPACE_UNKNOWN && $length > $freeSpace) {
|
||||||
throw new Sabre_DAV_Exception_InsufficientStorage();
|
throw new Sabre_DAV_Exception_InsufficientStorage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue