diff options
author | Edward Ly <contact@edward.ly> | 2025-03-20 08:53:38 -0700 |
---|---|---|
committer | Edward Ly <contact@edward.ly> | 2025-03-20 11:43:40 -0700 |
commit | eee8b309e651c8647614429cc5f99ddd914a2397 (patch) | |
tree | d23fbab95a01e9fff4d8f71720fad22be8728ee0 /lib | |
parent | 569b21fdfe659af70aa7f9c23e8def2f96a20c3c (diff) | |
download | nextcloud-server-fix/quota-exceptions.tar.gz nextcloud-server-fix/quota-exceptions.zip |
fix(Quota): throw NotEnoughSpaceException if file quota exceeded for mkdir operationfix/quota-exceptions
Signed-off-by: Edward Ly <contact@edward.ly>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Quota.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Quota.php b/lib/private/Files/Storage/Wrapper/Quota.php index 3be77ba1b37..d90d84d53f3 100644 --- a/lib/private/Files/Storage/Wrapper/Quota.php +++ b/lib/private/Files/Storage/Wrapper/Quota.php @@ -11,6 +11,7 @@ use OC\Files\Filesystem; use OC\SystemConfig; use OCP\Files\Cache\ICacheEntry; use OCP\Files\FileInfo; +use OCP\Files\NotEnoughSpaceException; use OCP\Files\Storage\IStorage; class Quota extends Wrapper { @@ -180,7 +181,7 @@ class Quota extends Wrapper { } $free = $this->free_space($path); if ($this->shouldApplyQuota($path) && $free == 0) { - return false; + throw new NotEnoughSpaceException('Unable to create directory (' . $path . '): not enough free space'); } return parent::mkdir($path); |