Skip to content

Commit

Permalink
Merge pull request #24694 from owncloud/stable8-fixchunkttl
Browse files Browse the repository at this point in the history
[stable8] Allow chunk GC mtime tolerance for unfinished part chunks
  • Loading branch information
Vincent Petry committed May 18, 2016
2 parents 8cee246 + 5bb892b commit 420dab7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/private/cache/file.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,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;
Expand Down

0 comments on commit 420dab7

Please sign in to comment.