the mount point always have delete permissions to allow unmount

This commit is contained in:
Bjoern Schiessle 2014-06-03 19:47:23 +02:00 committed by Robin Appelman
parent ca6631a710
commit 574de2d91b
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}