diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-05-11 13:36:25 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-06-01 13:22:56 +0200 |
commit | a1a25a9b5bddab05b6e8250557e8b7b6e17da1ff (patch) | |
tree | c7a0ae6a45cfabd9de0ee620e132fc6ca8a6db34 | |
parent | 7e418c7d699718b6d934de6184f6c96fdf9437d6 (diff) | |
download | nextcloud-server-a1a25a9b5bddab05b6e8250557e8b7b6e17da1ff.tar.gz nextcloud-server-a1a25a9b5bddab05b6e8250557e8b7b6e17da1ff.zip |
fix unlocking when moving mount points
-rw-r--r-- | lib/private/files/view.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index eb6fd0bb7aa..9540a2e2a9c 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -664,6 +664,11 @@ class View { $this->unlockFile($path1, ILockingProvider::LOCK_EXCLUSIVE); $this->unlockFile($path2, ILockingProvider::LOCK_EXCLUSIVE); + if ($internalPath1 === '' and $mount1 instanceof MoveableMount) { + // since $path2 now points to a different storage we need to unlock the path on the old storage separately + $storage2->releaseLock($internalPath2, ILockingProvider::LOCK_EXCLUSIVE, $this->lockingProvider); + } + if ((Cache\Scanner::isPartialFile($path1) && !Cache\Scanner::isPartialFile($path2)) && $result !== false) { // if it was a rename from a part file to a regular file it was a write and not a rename operation $this->updater->update($path2); |