Browse Source

Do not try clearing locked files in cache folder

tags/v8.2beta1
Vincent Petry 9 years ago
parent
commit
dd4de48418
1 changed files with 10 additions and 3 deletions
  1. 10
    3
      lib/private/cache/file.php

+ 10
- 3
lib/private/cache/file.php View File

@@ -177,9 +177,16 @@ class File implements ICache {
}
while (($file = readdir($dh)) !== false) {
if ($file != '.' and $file != '..') {
$mtime = $storage->filemtime('/' . $file);
if ($mtime < $now) {
$storage->unlink('/' . $file);
try {
$mtime = $storage->filemtime('/' . $file);
if ($mtime < $now) {
$storage->unlink('/' . $file);
}
} catch (\OCP\Lock\LockedException $e) {
// ignore locked chunks
\OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', array('app' => 'core'));
} catch (\OCP\Files\LockNotAcquiredException $e) {
\OC::$server->getLogger()->debug('Could not cleanup locked chunk "' . $file . '"', array('app' => 'core'));
}
}
}

Loading…
Cancel
Save