[Pkg-owncloud-commits] [owncloud] 201/273: Remove invalid mounts from the active fs

David Prévot taffit at moszumanska.debian.org
Fri Jul 4 03:13:17 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit edb67f9f4dc8d3c028ba6f2d157d2174fb40aba8
Author: Robin Appelman <icewind at owncloud.com>
Date:   Wed Jul 2 15:00:12 2014 +0200

    Remove invalid mounts from the active fs
---
 apps/files_sharing/lib/external/storage.php | 1 +
 lib/private/files/mount/manager.php         | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index cbde21d..3a0de51 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -142,6 +142,7 @@ class Storage extends DAV implements ISharedStorage {
 					// since this is permanent (re-sharing the file will create a new token)
 					// we remove the invalid storage
 					$this->manager->removeShare($this->mountPoint);
+					$this->manager->getMountManager()->removeMount($this->mountPoint);
 					throw new StorageInvalidException();
 				} else {
 					// ownCloud instance is gone, likely to be a temporary server configuration error
diff --git a/lib/private/files/mount/manager.php b/lib/private/files/mount/manager.php
index 45a9f33..e5180cf 100644
--- a/lib/private/files/mount/manager.php
+++ b/lib/private/files/mount/manager.php
@@ -27,6 +27,10 @@ class Manager {
 	 * @param string $mountPoint
 	 */
 	public function removeMount($mountPoint) {
+		$mountPoint = Filesystem::normalizePath($mountPoint);
+		if (strlen($mountPoint) > 1) {
+			$mountPoint .= '/';
+		}
 		unset($this->mounts[$mountPoint]);
 	}
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list