Merge pull request #24676 from owncloud/stable9-fixchunkttl

[stable9] Allow chunk GC mtime tolerance for unfinished part chunks
This commit is contained in:
Vincent Petry 2016-05-18 18:19:26 +02:00
commit fe1b8adf08
1 changed files with 3 additions and 1 deletions

View File

@ -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;