From a5b75d348f207d798667628722ee1575cc636d1d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Wed, 29 May 2013 14:19:18 +0200 Subject: [PATCH] for external storages we never reach the path 'files', instead we need to leave the loop if no further parent exists --- lib/public/share.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/public/share.php b/lib/public/share.php index afb5bc14914..0d4dc0f3fb7 100644 --- a/lib/public/share.php +++ b/lib/public/share.php @@ -141,9 +141,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( -- 2.39.5