[Pkg-owncloud-commits] [owncloud] 213/457: dont lock on meta data operations
David Prévot
taffit at moszumanska.debian.org
Sun Jun 28 20:06:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 1270c6800dd439e411278764e3a2ddb2f68040ac
Author: Robin Appelman <icewind at owncloud.com>
Date: Wed May 13 13:54:15 2015 +0200
dont lock on meta data operations
---
lib/private/files/view.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/private/files/view.php b/lib/private/files/view.php
index b8bbd60..b1333b4 100644
--- a/lib/private/files/view.php
+++ b/lib/private/files/view.php
@@ -960,7 +960,7 @@ class View {
if ($run and $storage) {
if (in_array('write', $hooks) || in_array('delete', $hooks)) {
$this->lockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
- } else {
+ } else if (in_array('read', $hooks)) {
$this->lockFile($path, ILockingProvider::LOCK_SHARED);
}
try {
@@ -972,7 +972,7 @@ class View {
} catch (\Exception $e) {
if (in_array('write', $hooks) || in_array('delete', $hooks)) {
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
- } else {
+ } else if (in_array('read', $hooks)) {
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
}
throw $e;
@@ -992,14 +992,14 @@ class View {
$result = CallbackWrapper::wrap($result, null, null, function () use ($hooks, $path) {
if (in_array('write', $hooks)) {
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
- } else {
+ } else if (in_array('read', $hooks)) {
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
}
});
} else {
if (in_array('write', $hooks) || in_array('delete', $hooks)) {
$this->unlockFile($path, ILockingProvider::LOCK_EXCLUSIVE);
- } else {
+ } else if (in_array('read', $hooks)) {
$this->unlockFile($path, ILockingProvider::LOCK_SHARED);
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list