summaryrefslogtreecommitdiffstats
path: root/lib/files.php
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-16 12:20:14 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-16 12:20:14 -0400
commitdf8a2e5361714838637457373f9957c76fbf449f (patch)
tree4067c30456a8d5221e19c59f030e7b223bd2bc2a /lib/files.php
parent9cb3113f421fd57529aa5e9d10a5e9ca9beece70 (diff)
downloadnextcloud-server-df8a2e5361714838637457373f9957c76fbf449f.tar.gz
nextcloud-server-df8a2e5361714838637457373f9957c76fbf449f.zip
File sharing cleanup, works perfectly I think :)
Diffstat (limited to 'lib/files.php')
-rw-r--r--lib/files.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/files.php b/lib/files.php
index fee71b777b3..07d432f8066 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -41,9 +41,9 @@ class OC_Files {
$pos = strpos($directory, '/', 8);
// Get shared folder name
if ($pos !== false) {
- $itemTarget = substr($directory, 0, $pos);
+ $itemTarget = substr($directory, 7, $pos - 7);
} else {
- $itemTarget = $directory;
+ $itemTarget = substr($directory, 7);
}
$files = OCP\Share::getItemSharedWith('folder', $itemTarget, OC_Share_Backend_File::FORMAT_FILE_APP, array('folder' => $directory, 'mimetype_filter' => $mimetype_filter));
}