Merge pull request #17620 from owncloud/s2s-hasupdated-catch405

Throw StorageNotAvailable if propfind on root failed
This commit is contained in:
Morris Jobke 2015-07-14 08:56:53 +02:00
commit c601fb8181
1 changed files with 5 additions and 1 deletions

View File

@ -760,7 +760,11 @@ class DAV extends Common {
return $remoteMtime > $time;
}
} catch (ClientHttpException $e) {
if ($e->getHttpStatus() === 404) {
if ($e->getHttpStatus() === 404 || $e->getHttpStatus() === 405) {
if ($path === '') {
// if root is gone it means the storage is not available
throw new StorageNotAvailableException(get_class($e).': '.$e->getMessage());
}
return false;
}
$this->convertException($e);