Skip to content

Commit

Permalink
Merge pull request #24693 from owncloud/stable8.1-fixchunkttl
Browse files Browse the repository at this point in the history
[stable8.1] Allow chunk GC mtime tolerance for unfinished part chunks
  • Loading branch information
Vincent Petry committed May 18, 2016
2 parents 76b4b36 + d46355a commit 97c9f57
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 @@ -170,7 +170,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 97c9f57

Please sign in to comment.