diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2014-05-28 17:18:41 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2014-05-28 17:28:31 +0200 |
commit | 9ed5083efd2e150cf5856160b0ff73744eb697d2 (patch) | |
tree | bbb897579be83ec6d18dde224a3261566d3f5b9a /apps/files_encryption/hooks | |
parent | 09645b92218075a984277c7f081fb4caa5b3c09b (diff) | |
download | nextcloud-server-9ed5083efd2e150cf5856160b0ff73744eb697d2.tar.gz nextcloud-server-9ed5083efd2e150cf5856160b0ff73744eb697d2.zip |
get mount point from mount manager
Diffstat (limited to 'apps/files_encryption/hooks')
-rw-r--r-- | apps/files_encryption/hooks/hooks.php | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/apps/files_encryption/hooks/hooks.php b/apps/files_encryption/hooks/hooks.php index 6e375f99a8e..f2096c3956e 100644 --- a/apps/files_encryption/hooks/hooks.php +++ b/apps/files_encryption/hooks/hooks.php @@ -320,14 +320,9 @@ class Hooks { $sharingEnabled = \OCP\Share::isEnabled();
- // get the path including mount point only if not a shared folder
- list($storage, ) = \OC\Files\Filesystem::resolvePath('/' . $userId . '/files' . $path);
-
- if (!($storage instanceof \OC\Files\Storage\Local)) {
- $mountPoint = 'files' . $storage->getMountPoint();
- } else {
- $mountPoint = '';
- }
+ $mountManager = \OC\Files\Filesystem::getMountManager();
+ $mount = $mountManager->find('/' . $userId . '/files' . $path);
+ $mountPoint = $mount->getMountPoint();
// if a folder was shared, get a list of all (sub-)folders
if ($params['itemType'] === 'folder') {
@@ -370,14 +365,9 @@ class Hooks { }
}
- // get the path including mount point only if not a shared folder
- list($storage, ) = \OC\Files\Filesystem::resolvePath('/' . $userId . '/files' . $path);
-
- if (!($storage instanceof \OC\Files\Storage\Local)) {
- $mountPoint = 'files' . $storage->getMountPoint();
- } else {
- $mountPoint = '';
- }
+ $mountManager = \OC\Files\Filesystem::getMountManager();
+ $mount = $mountManager->find('/' . $userId . '/files' . $path);
+ $mountPoint = $mount->getMountPoint();
// if we unshare a folder we need a list of all (sub-)files
if ($params['itemType'] === 'folder') {
|