aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
authorC. Montero Luque <cmonteroluque@users.noreply.github.com>2016-03-25 13:14:35 +0100
committerC. Montero Luque <cmonteroluque@users.noreply.github.com>2016-03-25 13:14:35 +0100
commit4123185d2db81aa4b3f613fef7cd294c96dbb384 (patch)
treec2065ec42a3de83234425dcdcdd8cdb62ad4fb19 /lib/private/files
parent6485d95c5ac830004e1db69e8478bb0e99309890 (diff)
parentae97b8e1c24e02afe933de2b6c34f958e6334e19 (diff)
downloadnextcloud-server-4123185d2db81aa4b3f613fef7cd294c96dbb384.tar.gz
nextcloud-server-4123185d2db81aa4b3f613fef7cd294c96dbb384.zip
Merge branch 'master' into background-scan-unscanned
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/view.php4
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