summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-04-02 12:03:37 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:30 +0200
commitfac7ec3fc445ed528d84b258717e856e3638d734 (patch)
tree9f6888e4e67b3a81a1b31f5e43a2fcdfb7951141 /lib
parent60d8a39f03aef3a2b555505396ccd5716ad85eb1 (diff)
downloadnextcloud-server-fac7ec3fc445ed528d84b258717e856e3638d734.tar.gz
nextcloud-server-fac7ec3fc445ed528d84b258717e856e3638d734.zip
fix re-shares with encryption
Diffstat (limited to 'lib')
-rw-r--r--lib/private/encryption/update.php8
-rw-r--r--lib/private/encryption/util.php6
2 files changed, 9 insertions, 5 deletions
diff --git a/lib/private/encryption/update.php b/lib/private/encryption/update.php
index e838e870502..1cfe935e584 100644
--- a/lib/private/encryption/update.php
+++ b/lib/private/encryption/update.php
@@ -94,7 +94,11 @@ class Update {
*/
private function update($fileSource) {
$path = \OC\Files\Filesystem::getPath($fileSource);
- $absPath = '/' . $this->uid . '/files' . $path;
+ $info = \OC\Files\Filesystem::getFileInfo($path);
+ $owner = \OC\Files\Filesystem::getOwner($path);
+ $view = new \OC\Files\View('/' . $owner . '/files');
+ $ownerPath = $view->getPath($info->getId());
+ $absPath = '/' . $owner . '/files' . $ownerPath;
$mount = $this->mountManager->find($path);
$mountPoint = $mount->getMountPoint();
@@ -110,7 +114,7 @@ class Update {
foreach ($allFiles as $path) {
$usersSharing = $this->file->getAccessList($path);
- $encryptionModule->update($absPath, $this->uid, $usersSharing);
+ $encryptionModule->update($path, $this->uid, $usersSharing);
}
}
diff --git a/lib/private/encryption/util.php b/lib/private/encryption/util.php
index e2c7fa26e66..54d587715bf 100644
--- a/lib/private/encryption/util.php
+++ b/lib/private/encryption/util.php
@@ -180,11 +180,11 @@ class Util {
foreach ($content as $c) {
// getDirectoryContent() returns the paths relative to the mount points, so we need
// to re-construct the complete path
- $path = ($mountPoint !== '') ? $mountPoint . '/' . $c['path'] : $c['path'];
+ $path = ($mountPoint !== '') ? $mountPoint . '/' . $c->getPath() : $c->getPath();
if ($c['type'] === 'dir') {
- $dirList[] = $path;
+ $dirList[] = \OC\Files\Filesystem::normalizePath($path);
} else {
- $result[] = $path;
+ $result[] = \OC\Files\Filesystem::normalizePath($path);
}
}