change lock back to shared before updating the cache

This commit is contained in:
Robin Appelman 2015-06-03 16:51:21 +02:00
parent 6b0874203d
commit bcf13aff6f
1 changed files with 4 additions and 1 deletions

View File

@ -556,9 +556,12 @@ class View {
list (, $result) = \OC_Helper::streamCopy($data, $target);
fclose($target);
fclose($data);
$this->changeLock($path, ILockingProvider::LOCK_SHARED);
$this->updater->update($path);
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
if ($this->shouldEmitHooks($path) && $result !== false) {
$this->emit_file_hooks_post($exists, $path);