Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-11-16 19:06:12 +0300
committerGitHub <noreply@github.com>2020-11-16 19:06:12 +0300
commit396a50fb24cf1bf780a53be8535ef34a2a6d5954 (patch)
tree2e344ce7717a14a382aeda0bc31b367c852854cf /lib
parentd7f6fa4b8dfb19bc3e39e7b15641b4d8fac37b52 (diff)
parenta428cfeb2627769c8b9aed70eb6cac18080d17e5 (diff)
Merge pull request #24077 from nextcloud/backport/23741/stable18
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/View.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index 9aaa37feee9..6ce13d9ca51 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -663,7 +663,13 @@ class View {
return false;
}
- $this->changeLock($path, ILockingProvider::LOCK_EXCLUSIVE);
+ try {
+ $this->changeLock($path, ILockingProvider::LOCK_EXCLUSIVE);
+ } catch (\Exception $e) {
+ // Release the shared lock before throwing.
+ $this->unlockFile($path, ILockingProvider::LOCK_SHARED);
+ throw $e;
+ }
/** @var \OC\Files\Storage\Storage $storage */
list($storage, $internalPath) = $this->resolvePath($path);