From 3d9863febcdc0526cee96a7cc57cc6633313bc9d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 24 Mar 2016 11:40:14 +0100 Subject: Lock the mountpoint while removing --- lib/private/files/view.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/private/files') 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 -- cgit v1.2.3 From c3508df09a28cbf88ea0f05a09979bcabd761513 Mon Sep 17 00:00:00 2001 From: Jörn Friedrich Dreyer Date: Thu, 24 Mar 2016 12:36:32 +0100 Subject: add missing var --- lib/private/files/objectstore/objectstorestorage.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/private/files') diff --git a/lib/private/files/objectstore/objectstorestorage.php b/lib/private/files/objectstore/objectstorestorage.php index 35c2c19c75b..8c643dbdcc7 100644 --- a/lib/private/files/objectstore/objectstorestorage.php +++ b/lib/private/files/objectstore/objectstorestorage.php @@ -38,6 +38,10 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common { * @var \OCP\Files\ObjectStore\IObjectStore $objectStore */ protected $objectStore; + /** + * @var string $id + */ + protected $id; /** * @var \OC\User\User $user */ -- cgit v1.2.3