Properly compare quota against both float/int values

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2022-11-18 14:12:43 +01:00
parent ff9569256e
commit f66226d18e
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF

View file

@ -227,7 +227,7 @@ class Quota extends Wrapper {
public function mkdir($path) {
$free = $this->free_space($path);
if ($this->shouldApplyQuota($path) && $free === 0.0) {
if ($this->shouldApplyQuota($path) && $free == 0) {
return false;
}
@ -236,7 +236,7 @@ class Quota extends Wrapper {
public function touch($path, $mtime = null) {
$free = $this->free_space($path);
if ($free === 0.0) {
if ($free == 0) {
return false;
}