Skip to content

Commit

Permalink
Catch NotFoundException when querying quota
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
PVince81 committed Jan 25, 2021
1 parent b98860e commit f9d4584
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/dav/lib/Connector/Sabre/Directory.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
use OCP\Files\FileInfo;
use OCP\Files\ForbiddenException;
use OCP\Files\InvalidPathException;
use OCP\Files\NotFoundException;
use OCP\Files\StorageNotAvailableException;
use OCP\Lock\ILockingProvider;
use OCP\Lock\LockedException;
Expand Down Expand Up @@ -339,6 +340,8 @@ public function getQuotaInfo() {
$free
];
return $this->quotaInfo;
} catch (\OCP\Files\NotFoundException $e) {
return [0, 0];
} catch (\OCP\Files\StorageNotAvailableException $e) {
return [0, 0];
}
Expand Down

0 comments on commit f9d4584

Please sign in to comment.