aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-04-08 19:57:07 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-04-23 12:54:25 +0200
commited981294f11bd59733e0d121cbf737e16275b666 (patch)
tree8b13b3224a29db6e3aa64170154c6f2e1b941595 /lib
parent27c5a978f91e7aa447a2acca040fd173baba53b9 (diff)
downloadnextcloud-server-ed981294f11bd59733e0d121cbf737e16275b666.tar.gz
nextcloud-server-ed981294f11bd59733e0d121cbf737e16275b666.zip
fix share api tests
Diffstat (limited to 'lib')
-rw-r--r--lib/private/share/share.php6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index ff56b9a48f1..24e2a150640 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1177,10 +1177,6 @@ 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']));
if (\OC_DB::isError($result)) {
@@ -1189,7 +1185,7 @@ class Share extends \OC\Share\Constants {
\OC_Log::ERROR);
} else {
$parentRow = $parentResult->fetchRow();
- $tmpPath = '/Shared' . $parentRow['file_target'];
+ $tmpPath = $parentRow['file_target'];
// find the right position where the row path continues from the target path
$pos = strrpos($row['path'], $parentRow['file_target']);
$subPath = substr($row['path'], $pos);