Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
pull/7348/head
Roeland Jago Douma 8 years ago
parent c8a29ec942
commit d2fe30d464
No known key found for this signature in database
GPG Key ID: F941078878347C0C
  1. 2
      apps/dav/lib/Connector/Sabre/ObjectTree.php
  2. 2
      apps/dav/tests/unit/Connector/Sabre/ObjectTreeTest.php

@ -156,7 +156,7 @@ class ObjectTree extends CachingTree {
try {
$info = $this->fileView->getFileInfo($path);
if ($info->getStorage()->instanceOfStorage(FailedStorage::class)) {
if ($info instanceof \OCP\Files\FileInfo && $info->getStorage()->instanceOfStorage(FailedStorage::class)) {
throw new StorageNotAvailableException();
}
} catch (StorageNotAvailableException $e) {

@ -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')

Loading…
Cancel
Save