diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-05-18 18:19:08 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-05-18 18:19:08 +0200 |
commit | 01f44d83b2b71ef906dc0394011d1e5f09de256a (patch) | |
tree | 1c808029843794f00b6ea15763cc328fb81a2d02 /lib | |
parent | 9f04248f623b7066a8b13c2c361c2e6068f7e148 (diff) | |
parent | e0af5263fb8352da39555033bd9555ba773d358a (diff) | |
download | nextcloud-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.php | 4 |
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; |