\r
$sharingEnabled = \OCP\Share::isEnabled();\r
\r
+ // get the path including mount point only if not a shared folder\r
+ if(strncmp($path, '/Shared' , strlen('/Shared') !== 0)) {\r
+ // get path including the the storage mount point\r
+ $path = $util->getPathWithMountPoint($params['itemSource']);\r
+ }\r
+\r
// if a folder was shared, get a list of all (sub-)folders\r
if ($params['itemType'] === 'folder') {\r
-\r
- // get the path including mount point only if not a shared folder\r
- if(strncmp($path, '/Shared' , strlen('/Shared') !== 0)) {\r
- // get path including the the storage mount point\r
- $path = $util->getPathWithMountPoint($params['itemSource']);\r
- }\r
-\r
$allFiles = $util->getAllFiles($path);\r
} else {\r
$allFiles = array($path);\r
\r
// rebuild path\r
foreach ($targetPathSplit as $pathPart) {\r
-\r
if ($pathPart !== $sharedPart) {\r
-\r
$path = '/' . $pathPart . $path;\r
-\r
} else {\r
-\r
break;\r
-\r
}\r
-\r
}\r
\r
// prefix path with Shared\r
}\r
}\r
\r
- // if we unshare a folder we need a list of all (sub-)files\r
- if ( $params['itemType'] === 'folder' ) {\r
-\r
- // get the path including mount point only if not a shared folder\r
- if(strncmp($path, '/Shared' , strlen('/Shared') !== 0)) {\r
- // get path including the the storage mount point\r
- $path = $util->getPathWithMountPoint($params['itemSource']);\r
- }\r
+ // get the path including mount point only if not a shared folder\r
+ if(strncmp($path, '/Shared' , strlen('/Shared') !== 0)) {\r
+ // get path including the the storage mount point\r
+ $path = $util->getPathWithMountPoint($params['itemSource']);\r
+ }\r
\r
+ // if we unshare a folder we need a list of all (sub-)files\r
+ if ($params['itemType'] === 'folder') {\r
$allFiles = $util->getAllFiles( $path );\r
- \r
} else {\r
-\r
$allFiles = array($path);\r
}\r
\r