diff options
author | Achim Königs <garfonso@mobo.info> | 2016-03-26 14:27:38 +0100 |
---|---|---|
committer | Achim Königs <garfonso@mobo.info> | 2016-03-26 14:27:38 +0100 |
commit | 596a8416c2c36449c7b9842e95ea05720c88fca3 (patch) | |
tree | 4de43af057270ce30cd601015fee752f22bfbaa3 /lib/private/files/view.php | |
parent | 4b2f9e40275826c36bc1b225f321274f3b3bc2f1 (diff) | |
parent | 3e33b686b18b9e698ed16bf4466666357be0c407 (diff) | |
download | nextcloud-server-596a8416c2c36449c7b9842e95ea05720c88fca3.tar.gz nextcloud-server-596a8416c2c36449c7b9842e95ea05720c88fca3.zip |
Merge branch 'master' into alarms_for_birthdayevents
Diffstat (limited to 'lib/private/files/view.php')
-rw-r--r-- | lib/private/files/view.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 52be8a7e226..4421a016356 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -269,17 +269,21 @@ class View { // cut of /user/files to get the relative path to data/user/files $pathParts = explode('/', $path, 4); $relPath = '/' . $pathParts[3]; + $this->lockFile($relPath, ILockingProvider::LOCK_SHARED, true); \OC_Hook::emit( Filesystem::CLASSNAME, "umount", array(Filesystem::signal_param_path => $relPath) ); + $this->changeLock($relPath, ILockingProvider::LOCK_EXCLUSIVE, true); $result = $mount->removeMount(); + $this->changeLock($relPath, ILockingProvider::LOCK_SHARED, true); if ($result) { \OC_Hook::emit( Filesystem::CLASSNAME, "post_umount", array(Filesystem::signal_param_path => $relPath) ); } + $this->unlockFile($relPath, ILockingProvider::LOCK_SHARED, true); return $result; } else { // do not allow deleting the storage's root / the mount point |