Skip to content

Commit f9d4584

Browse files
committed
Catch NotFoundException when querying quota
Fixes parent folder that becomes inaccessible when it contains a non-existing / broken entry because the quota check made the PROPFIND on parent fail altogether. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
1 parent b98860e commit f9d4584

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

apps/dav/lib/Connector/Sabre/Directory.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
use OCP\Files\FileInfo;
4242
use OCP\Files\ForbiddenException;
4343
use OCP\Files\InvalidPathException;
44+
use OCP\Files\NotFoundException;
4445
use OCP\Files\StorageNotAvailableException;
4546
use OCP\Lock\ILockingProvider;
4647
use OCP\Lock\LockedException;
@@ -339,6 +340,8 @@ public function getQuotaInfo() {
339340
$free
340341
];
341342
return $this->quotaInfo;
343+
} catch (\OCP\Files\NotFoundException $e) {
344+
return [0, 0];
342345
} catch (\OCP\Files\StorageNotAvailableException $e) {
343346
return [0, 0];
344347
}

0 commit comments

Comments
 (0)