summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-06-03 16:51:21 +0200
committerRobin Appelman <icewind@owncloud.com>2015-06-03 17:18:50 +0200
commitbcf13aff6f9082f87930068ecd9560612e36fc6a (patch)
tree83b64fa728d7abb0584013239afc911f2b86b31a /lib/private
parent6b0874203d3dc77bf4ff274add5a7d7844e791b8 (diff)
downloadnextcloud-server-bcf13aff6f9082f87930068ecd9560612e36fc6a.tar.gz
nextcloud-server-bcf13aff6f9082f87930068ecd9560612e36fc6a.zip
change lock back to shared before updating the cache
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/files/view.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index 1b492213053..48fec01f171 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -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);