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
567757c793
commit
c8a29ec942
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
namespace OCA\DAV\Connector\Sabre;
|
namespace OCA\DAV\Connector\Sabre;
|
||||||
|
|
||||||
|
use OC\Files\Storage\FailedStorage;
|
||||||
use OCA\DAV\Connector\Sabre\Exception\Forbidden;
|
use OCA\DAV\Connector\Sabre\Exception\Forbidden;
|
||||||
use OCA\DAV\Connector\Sabre\Exception\InvalidPath;
|
use OCA\DAV\Connector\Sabre\Exception\InvalidPath;
|
||||||
use OCA\DAV\Connector\Sabre\Exception\FileLocked;
|
use OCA\DAV\Connector\Sabre\Exception\FileLocked;
|
||||||
|
@ -154,6 +155,10 @@ class ObjectTree extends CachingTree {
|
||||||
// read from cache
|
// read from cache
|
||||||
try {
|
try {
|
||||||
$info = $this->fileView->getFileInfo($path);
|
$info = $this->fileView->getFileInfo($path);
|
||||||
|
|
||||||
|
if ($info->getStorage()->instanceOfStorage(FailedStorage::class)) {
|
||||||
|
throw new StorageNotAvailableException();
|
||||||
|
}
|
||||||
} catch (StorageNotAvailableException $e) {
|
} catch (StorageNotAvailableException $e) {
|
||||||
throw new \Sabre\DAV\Exception\ServiceUnavailable('Storage is temporarily not available');
|
throw new \Sabre\DAV\Exception\ServiceUnavailable('Storage is temporarily not available');
|
||||||
} catch (StorageInvalidException $e) {
|
} catch (StorageInvalidException $e) {
|
||||||
|
|
Loading…
Reference in New Issue