diff options
author | Julius Härtl <jus@bitgrid.net> | 2020-11-16 19:06:12 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-16 19:06:12 +0300 |
commit | 396a50fb24cf1bf780a53be8535ef34a2a6d5954 (patch) | |
tree | 2e344ce7717a14a382aeda0bc31b367c852854cf /lib | |
parent | d7f6fa4b8dfb19bc3e39e7b15641b4d8fac37b52 (diff) | |
parent | a428cfeb2627769c8b9aed70eb6cac18080d17e5 (diff) |
Merge pull request #24077 from nextcloud/backport/23741/stable18
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/View.php | 8 |
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); |