From 574de2d91b1bb913385e308d5e53b0e7faa29d8e Mon Sep 17 00:00:00 2001
From: Bjoern Schiessle <schiessle@owncloud.com>
Date: Tue, 3 Jun 2014 19:47:23 +0200
Subject: [PATCH] the mount point always have delete permissions to allow
 unmount

---
 apps/files_sharing/lib/sharedstorage.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php
index ea0e420a5c..6b2873302a 100644
--- a/apps/files_sharing/lib/sharedstorage.php
+++ b/apps/files_sharing/lib/sharedstorage.php
@@ -106,8 +106,8 @@ class Shared extends \OC\Files\Storage\Common {
 	 */
 	public function getPermissions($target = '') {
 		$permissions = $this->share['permissions'];
-		// part file are always have delete permissions
-		if (pathinfo($target, PATHINFO_EXTENSION) === 'part') {
+		// part files and the mount point always have delete permissions
+		if ($target === '' || pathinfo($target, PATHINFO_EXTENSION) === 'part') {
 			$permissions |= \OCP\PERMISSION_DELETE;
 		}
 
-- 
GitLab