summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share/share.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index e4886abd2b5..a385328edc1 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1085,10 +1085,12 @@ class Share extends \OC\Share\Constants {
// Remove root from file source paths if retrieving own shared items
if (isset($uidOwner) && isset($row['path'])) {
if (isset($row['parent'])) {
+ // FIXME: Doesn't always construct the correct path, example:
+ // Folder '/a/b', share '/a' and '/a/b' to user2
+ // user2 reshares /Shared/b and ask for share status of /Shared/a/b
+ // expected result: path=/Shared/a/b; actual result /Shared/b because of the parent
$query = \OC_DB::prepare('SELECT `file_target` FROM `*PREFIX*share` WHERE `id` = ?');
$parentResult = $query->execute(array($row['parent']));
- //$query = \OC_DB::prepare('SELECT `file_target` FROM `*PREFIX*share` WHERE `id` = ?');
- //$parentResult = $query->execute(array($row['id']));
if (\OC_DB::isError($result)) {
\OC_Log::write('OCP\Share', 'Can\'t select parent: ' .
\OC_DB::getErrorMessage($result) . ', select=' . $select . ' where=' . $where,