Skip to content
Snippets Groups Projects
Commit 01f44d83 authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #24691 from owncloud/fixchunkttl

Allow chunk GC mtime tolerance for unfinished part chunks
parents 9f04248f e0af5263
No related branches found
No related tags found
No related merge requests found
...@@ -172,7 +172,9 @@ class File implements ICache { ...@@ -172,7 +172,9 @@ class File implements ICache {
public function gc() { public function gc() {
$storage = $this->getStorage(); $storage = $this->getStorage();
if ($storage and $storage->is_dir('/')) { 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('/'); $dh = $storage->opendir('/');
if (!is_resource($dh)) { if (!is_resource($dh)) {
return null; return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment