diff options
Diffstat (limited to 'lib/private/files/view.php')
-rw-r--r-- | lib/private/files/view.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 76b7d34e756..fd2ba11d30b 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -1037,7 +1037,22 @@ class View { if ($subCache->getStatus('') === Cache\Cache::NOT_FOUND) { $subScanner = $subStorage->getScanner(''); - $subScanner->scanFile(''); + try { + $subScanner->scanFile(''); + } catch (\OCP\Files\StorageNotAvailableException $e) { + continue; + } catch (\OCP\Files\StorageInvalidException $e) { + continue; + } catch (\Exception $e) { + // sometimes when the storage is not available it can be any exception + \OCP\Util::writeLog( + 'core', + 'Exception while scanning storage "' . $subStorage->getId() . '": ' . + get_class($e) . ': ' . $e->getMessage(), + \OC_Log::ERROR + ); + continue; + } } $rootEntry = $subCache->get(''); |