diff options
author | Florin Peter <github@florin-peter.de> | 2013-05-31 12:49:46 +0200 |
---|---|---|
committer | Florin Peter <github@florin-peter.de> | 2013-05-31 12:49:46 +0200 |
commit | 88d74c33af4718fe78f7b37fa117ecedc9832d65 (patch) | |
tree | ffef6b86b8a7e0639274050ad2430f1291037897 /apps/files_encryption/hooks | |
parent | 4a0e69f94180725552ed35ba9cc81eeb6a71c3aa (diff) | |
parent | d636e168a6c043ddae730f7cdaaee772b1067793 (diff) | |
download | nextcloud-server-88d74c33af4718fe78f7b37fa117ecedc9832d65.tar.gz nextcloud-server-88d74c33af4718fe78f7b37fa117ecedc9832d65.zip |
Merge branch 'master' into files_encryption_fs_loaded_fix
Diffstat (limited to 'apps/files_encryption/hooks')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 743593d798a..d1b08a0b978 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -332,6 +332,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);
@@ -381,17 +387,11 @@ class Hooks { // rebuild path
foreach ($targetPathSplit as $pathPart) {
-
if ($pathPart !== $sharedPart) {
-
$path = '/' . $pathPart . $path;
-
} else {
-
break;
-
}
-
}
// prefix path with Shared
@@ -409,13 +409,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);
}
|