summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-05-29 14:19:18 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-05-29 14:19:18 +0200
commit893a1ed6f57966dcf5270837f121118c5e13c457 (patch)
treec1b48da86bef7ecde3ef4a2d2bad302fd0e12e19 /lib/public
parent672811c103a352ecb4bc33c2071b9b4493398b30 (diff)
downloadnextcloud-server-893a1ed6f57966dcf5270837f121118c5e13c457.tar.gz
nextcloud-server-893a1ed6f57966dcf5270837f121118c5e13c457.zip
for external storages we never reach the path 'files', instead we need to leave the loop if no further parent exists
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/share.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/public/share.php b/lib/public/share.php
index 558efb49c0b..19f7b2a20a9 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -140,9 +140,10 @@ class Share {
$view = new \OC\Files\View('/' . $user . '/files/');
$meta = $view->getFileInfo(\OC_Filesystem::normalizePath($path));
$source = $meta['fileid'];
+ $parent = $meta['parent'];
$cache = new \OC\Files\Cache\Cache($meta['storage']);
- while ($path !== 'files') {
+ while ($path !== 'files' && $parent !== '-1') {
// Fetch all shares of this file path from DB
$query = \OC_DB::prepare(