diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-04-02 12:03:37 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:30 +0200 |
commit | fac7ec3fc445ed528d84b258717e856e3638d734 (patch) | |
tree | 9f6888e4e67b3a81a1b31f5e43a2fcdfb7951141 /lib | |
parent | 60d8a39f03aef3a2b555505396ccd5716ad85eb1 (diff) | |
download | nextcloud-server-fac7ec3fc445ed528d84b258717e856e3638d734.tar.gz nextcloud-server-fac7ec3fc445ed528d84b258717e856e3638d734.zip |
fix re-shares with encryption
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/encryption/update.php | 8 | ||||
-rw-r--r-- | lib/private/encryption/util.php | 6 |
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); } } |