summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/hooks
diff options
context:
space:
mode:
authorFlorin Peter <github@florin-peter.de>2013-05-31 12:58:12 +0200
committerFlorin Peter <github@florin-peter.de>2013-05-31 12:58:12 +0200
commit1bfe975938e96f462afe5ef5e5ebc75735767711 (patch)
tree041bb3fe5f9cbd8ccff3fcacd2d629287b7d0410 /apps/files_encryption/hooks
parent96ef926161155cf710838612501bf76756f89cb4 (diff)
parentd636e168a6c043ddae730f7cdaaee772b1067793 (diff)
downloadnextcloud-server-1bfe975938e96f462afe5ef5e5ebc75735767711.tar.gz
nextcloud-server-1bfe975938e96f462afe5ef5e5ebc75735767711.zip
Merge branch 'master' into files_encryption_upgrade_fix
Conflicts: apps/files_encryption/lib/util.php
Diffstat (limited to 'apps/files_encryption/hooks')
-rw-r--r--apps/files_encryption/hooks/hooks.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php
index 4e0e5c4b958..02602989087 100644
--- a/apps/files_encryption/hooks/hooks.php
+++ b/apps/files_encryption/hooks/hooks.php
@@ -327,6 +327,12 @@ class Hooks {
$sharingEnabled = \OCP\Share::isEnabled();
+ // get the path including mount point only if not a shared folder
+ if(strncmp($path, '/Shared' , strlen('/Shared') !== 0)) {
+ // get path including the the storage mount point
+ $path = $util->getPathWithMountPoint($params['itemSource']);
+ }
+
// if a folder was shared, get a list of all (sub-)folders
if ($params['itemType'] === 'folder') {
$allFiles = $util->getAllFiles($path);
@@ -376,17 +382,11 @@ class Hooks {
// rebuild path
foreach ($targetPathSplit as $pathPart) {
-
if ($pathPart !== $sharedPart) {
-
$path = '/' . $pathPart . $path;
-
} else {
-
break;
-
}
-
}
// prefix path with Shared
@@ -404,13 +404,16 @@ class Hooks {
}
}
+ // get the path including mount point only if not a shared folder
+ if(strncmp($path, '/Shared' , strlen('/Shared') !== 0)) {
+ // get path including the the storage mount point
+ $path = $util->getPathWithMountPoint($params['itemSource']);
+ }
+
// if we unshare a folder we need a list of all (sub-)files
if ($params['itemType'] === 'folder') {
-
- $allFiles = $util->getAllFiles($path);
-
+ $allFiles = $util->getAllFiles( $path );
} else {
-
$allFiles = array($path);
}