summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-05-18 18:19:08 +0200
committerVincent Petry <pvince81@owncloud.com>2016-05-18 18:19:08 +0200
commit01f44d83b2b71ef906dc0394011d1e5f09de256a (patch)
tree1c808029843794f00b6ea15763cc328fb81a2d02 /lib
parent9f04248f623b7066a8b13c2c361c2e6068f7e148 (diff)
parente0af5263fb8352da39555033bd9555ba773d358a (diff)
downloadnextcloud-server-01f44d83b2b71ef906dc0394011d1e5f09de256a.tar.gz
nextcloud-server-01f44d83b2b71ef906dc0394011d1e5f09de256a.zip
Merge pull request #24691 from owncloud/fixchunkttl
Allow chunk GC mtime tolerance for unfinished part chunks
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Cache/File.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/Cache/File.php b/lib/private/Cache/File.php
index 989e05275b7..38f88959bd7 100644
--- a/lib/private/Cache/File.php
+++ b/lib/private/Cache/File.php
@@ -172,7 +172,9 @@ class File implements ICache {
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;