diff --git a/lib/private/cache/file.php b/lib/private/cache/file.php index 69008c7fab5c..a5effd265cd9 100644 --- a/lib/private/cache/file.php +++ b/lib/private/cache/file.php @@ -170,7 +170,9 @@ public function clear($prefix = '') { public function gc() { $storage = $this->getStorage(); if ($storage and $storage->is_dir('/')) { - $now = time(); + // extra hour safety, in case of stray part chunks that take longer to write, + // because touch() is only called after the chunk was finished + $now = time() - 3600; $dh = $storage->opendir('/'); if (!is_resource($dh)) { return null;