Skip to content
Snippets Groups Projects
Commit b4241824 authored by Robin Appelman's avatar Robin Appelman
Browse files

Also fixed the returned internal path when getting the root shared item by id

parent 672a8248
No related branches found
No related tags found
No related merge requests found
...@@ -88,7 +88,7 @@ class Shared_Cache extends Cache { ...@@ -88,7 +88,7 @@ class Shared_Cache extends Cache {
if ($cache = $this->getSourceCache($file)) { if ($cache = $this->getSourceCache($file)) {
$data = $cache->get($this->files[$file]); $data = $cache->get($this->files[$file]);
$data['displayname_owner'] = \OC_User::getDisplayName($this->storage->getSharedFrom()); $data['displayname_owner'] = \OC_User::getDisplayName($this->storage->getSharedFrom());
$data['path'] = ''; $data['path'] = $file;
if ($file === '') { if ($file === '') {
$data['is_share_mount_point'] = true; $data['is_share_mount_point'] = true;
} }
...@@ -100,7 +100,6 @@ class Shared_Cache extends Cache { ...@@ -100,7 +100,6 @@ class Shared_Cache extends Cache {
// cache information for the source item // cache information for the source item
if (!is_int($file) || $file === 0) { if (!is_int($file) || $file === 0) {
$file = $this->storage->getSourceId(); $file = $this->storage->getSourceId();
$mountPoint = $this->storage->getMountPoint();
} }
$query = \OC_DB::prepare( $query = \OC_DB::prepare(
'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`,' 'SELECT `fileid`, `storage`, `path`, `parent`, `name`, `mimetype`, `mimepart`,'
...@@ -123,8 +122,8 @@ class Shared_Cache extends Cache { ...@@ -123,8 +122,8 @@ class Shared_Cache extends Cache {
} else { } else {
$data['size'] = (int)$data['size']; $data['size'] = (int)$data['size'];
} }
if (isset($mountPoint)) { if (!is_int($file) || $file === 0) {
$data['path'] = 'files/' . $mountPoint; $data['path'] = '';
$data['is_share_mount_point'] = true; $data['is_share_mount_point'] = true;
} }
return $data; return $data;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment