A failed storage is a not available storage
We have to double check. Since getting the info of the root returns a generic entry. But actually the stroage is not available. Else we get very weird sync and web behavior. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
f3b9b213eb
commit
7e6dd02441
|
@ -29,6 +29,7 @@
|
|||
|
||||
namespace OCA\DAV\Connector\Sabre;
|
||||
|
||||
use OC\Files\Storage\FailedStorage;
|
||||
use OCA\DAV\Connector\Sabre\Exception\Forbidden;
|
||||
use OCA\DAV\Connector\Sabre\Exception\InvalidPath;
|
||||
use OCA\DAV\Connector\Sabre\Exception\FileLocked;
|
||||
|
@ -158,6 +159,10 @@ class ObjectTree extends \Sabre\DAV\Tree {
|
|||
// read from cache
|
||||
try {
|
||||
$info = $this->fileView->getFileInfo($path);
|
||||
|
||||
if ($info->getStorage()->instanceOfStorage(FailedStorage::class)) {
|
||||
throw new StorageNotAvailableException();
|
||||
}
|
||||
} catch (StorageNotAvailableException $e) {
|
||||
throw new \Sabre\DAV\Exception\ServiceUnavailable('Storage is temporarily not available');
|
||||
} catch (StorageInvalidException $e) {
|
||||
|
|
Loading…
Reference in New Issue