diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-05-18 18:21:09 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-05-18 18:21:09 +0200 |
commit | 420dab76385cddabb6182bf05f6568b8aa660a9e (patch) | |
tree | 22b3577d6727c4114aa8b75fb3f21651b7c6897f | |
parent | 8cee246880fdd652807c973aaadc535ee328258a (diff) | |
parent | 5bb892b2063f5f795046ecf5f00a638b48bbbc9d (diff) | |
download | nextcloud-server-420dab76385cddabb6182bf05f6568b8aa660a9e.tar.gz nextcloud-server-420dab76385cddabb6182bf05f6568b8aa660a9e.zip |
Merge pull request #24694 from owncloud/stable8-fixchunkttl
[stable8] Allow chunk GC mtime tolerance for unfinished part chunks
-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 3b500c4e45b..4624d3b2029 100644 --- a/lib/private/cache/file.php +++ b/lib/private/cache/file.php @@ -118,7 +118,9 @@ class File { 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; |