diff options
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/l10n/es.js | 2 | ||||
-rw-r--r-- | apps/dav/l10n/es.json | 2 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/ObjectTree.php | 5 | ||||
-rw-r--r-- | apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php | 2 |
4 files changed, 9 insertions, 2 deletions
diff --git a/apps/dav/l10n/es.js b/apps/dav/l10n/es.js index cb67f8774b6..24daea7ca82 100644 --- a/apps/dav/l10n/es.js +++ b/apps/dav/l10n/es.js @@ -55,7 +55,7 @@ OC.L10N.register( "Contacts" : "Contactos", "Technical details" : "Detalles técnicos", "Remote Address: %s" : "Dirección remota: %s", - "Request ID: %s" : "ID de la solicitud: %s", + "Request ID: %s" : "ID de solicitud: %s", "CalDAV server" : "Servidor CalDAV", "Send invitations to attendees" : "Enviar invitaciones a los asistentes", "Please make sure to properly set up the email settings above." : "Por favor, asegúrate de que las configuraciones de correo de arriba son correctas" diff --git a/apps/dav/l10n/es.json b/apps/dav/l10n/es.json index 7d3abca51cb..573a49dd8f1 100644 --- a/apps/dav/l10n/es.json +++ b/apps/dav/l10n/es.json @@ -53,7 +53,7 @@ "Contacts" : "Contactos", "Technical details" : "Detalles técnicos", "Remote Address: %s" : "Dirección remota: %s", - "Request ID: %s" : "ID de la solicitud: %s", + "Request ID: %s" : "ID de solicitud: %s", "CalDAV server" : "Servidor CalDAV", "Send invitations to attendees" : "Enviar invitaciones a los asistentes", "Please make sure to properly set up the email settings above." : "Por favor, asegúrate de que las configuraciones de correo de arriba son correctas" diff --git a/apps/dav/lib/Connector/Sabre/ObjectTree.php b/apps/dav/lib/Connector/Sabre/ObjectTree.php index 41bfceeab96..25db1d5028c 100644 --- a/apps/dav/lib/Connector/Sabre/ObjectTree.php +++ b/apps/dav/lib/Connector/Sabre/ObjectTree.php @@ -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; @@ -154,6 +155,10 @@ class ObjectTree extends CachingTree { // read from cache try { $info = $this->fileView->getFileInfo($path); + + if ($info instanceof \OCP\Files\FileInfo && $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) { diff --git a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php index a8fbcb39a85..cd575e4ff3c 100644 --- a/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php @@ -174,6 +174,8 @@ class ObjectTreeTest extends \Test\TestCase { $fileInfo->expects($this->once()) ->method('getName') ->will($this->returnValue($outputFileName)); + $fileInfo->method('getStorage') + ->willReturn($this->createMock(\OC\Files\Storage\Common::class)); $view->expects($this->once()) ->method('getFileInfo') |