diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-06-30 17:00:46 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-06-30 17:00:46 +0200 |
commit | dd4de48418466084c5e21bc7704359d4a80a3c5a (patch) | |
tree | c0c00110bc66a4448d52a4b598a20e1c1ff5de9b /lib/private/cache | |
parent | 0118bf04dc792ec3025719482b23be8d215ed467 (diff) | |
download | nextcloud-server-dd4de48418466084c5e21bc7704359d4a80a3c5a.tar.gz nextcloud-server-dd4de48418466084c5e21bc7704359d4a80a3c5a.zip |
Do not try clearing locked files in cache folder
Diffstat (limited to 'lib/private/cache')
-rw-r--r-- | lib/private/cache/file.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/private/cache/file.php b/lib/private/cache/file.php index 32c00125764..69008c7fab5 100644 --- a/lib/private/cache/file.php +++ b/lib/private/cache/file.php @@ -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')); } } } |