fix quota wrapper reporting negative free_space, breaking user interface
return 0 instead
This commit is contained in:
parent
88cc2ccb3b
commit
8f10c9571f
|
@ -48,7 +48,7 @@ class Quota extends Wrapper {
|
||||||
return \OC\Files\SPACE_NOT_COMPUTED;
|
return \OC\Files\SPACE_NOT_COMPUTED;
|
||||||
} else {
|
} else {
|
||||||
$free = $this->storage->free_space($path);
|
$free = $this->storage->free_space($path);
|
||||||
return min($free, ($this->quota - $used));
|
return min($free, (max($this->quota - $used, 0)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue