summaryrefslogtreecommitdiffstats
path: root/lib/base.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/base.php')
-rw-r--r--lib/base.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/base.php b/lib/base.php
index 829c2bcb866..8812d5698f1 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -730,8 +730,14 @@ class OC {
// NOTE: This will be replaced to use OCP
$userSession = self::$server->getUserSession();
$userSession->listen('\OC\User', 'postLogin', function () {
- $cache = new \OC\Cache\File();
- $cache->gc();
+ try {
+ $cache = new \OC\Cache\File();
+ $cache->gc();
+ } catch (\Exception $e) {
+ // a GC exception should not prevent users from using OC,
+ // so log the exception
+ \OC::$server->getLogger()->warning('Exception when running cache gc: ' . $e->getMessage(), array('app' => 'core'));
+ }
});
}
}