diff options
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/share/file.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 14 |
2 files changed, 13 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php index e1d0b49706b..c0c9e0c107e 100644 --- a/apps/files_sharing/lib/share/file.php +++ b/apps/files_sharing/lib/share/file.php @@ -60,6 +60,12 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent { */ public function generateTarget($filePath, $shareWith, $exclude = null) { $target = '/'.basename($filePath); + + // for group shares we return the target right away + if ($shareWith === false) { + return $target; + } + \OC\Files\Filesystem::initMountPoints($shareWith); $view = new \OC\Files\View('/' . $shareWith . '/files'); $excludeList = \OCP\Share::getItemsSharedWithUser('file', $shareWith, self::FORMAT_TARGET_NAMES); diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 565c3e7af8e..c90f6d71f71 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -195,7 +195,7 @@ class Shared extends \OC\Files\Storage\Common { public function isCreatable($path) { if ($path == '') { - return ($this->getPermissions($this->getMountPoint()) & \OCP\PERMISSION_CREATE); + $path = $this->mountPoint; } return ($this->getPermissions($path) & \OCP\PERMISSION_CREATE); } @@ -206,21 +206,21 @@ class Shared extends \OC\Files\Storage\Common { public function isUpdatable($path) { if ($path == '') { - return false; + $path = $this->mountPoint; } return ($this->getPermissions($path) & \OCP\PERMISSION_UPDATE); } public function isDeletable($path) { if ($path == '') { - return true; + $path = $this->mountPoint; } return ($this->getPermissions($path) & \OCP\PERMISSION_DELETE); } public function isSharable($path) { if ($path == '') { - return false; + $path = $this->mountPoint; } return ($this->getPermissions($path) & \OCP\PERMISSION_SHARE); } @@ -441,7 +441,7 @@ class Shared extends \OC\Files\Storage\Common { public function free_space($path) { if ($path == '') { - return \OC\Files\SPACE_UNKNOWN; + $path = $this->mountPoint; } $source = $this->getSourcePath($path); if ($source) { @@ -531,7 +531,7 @@ class Shared extends \OC\Files\Storage\Common { public function getOwner($path) { if ($path == '') { - return false; + $path = $this->mountPoint; } $source = $this->getFile($path); if ($source) { @@ -542,7 +542,7 @@ class Shared extends \OC\Files\Storage\Common { public function getETag($path) { if ($path == '') { - return parent::getETag($path); + $path = $this->mountPoint; } if ($source = $this->getSourcePath($path)) { list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath($source); |