]> source.dussan.org Git - nextcloud-server.git/commitdiff
for external storages we never reach the path 'files', instead we need to leave the...
authorBjörn Schießle <schiessle@owncloud.com>
Wed, 29 May 2013 12:19:18 +0000 (14:19 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Wed, 29 May 2013 12:19:18 +0000 (14:19 +0200)
lib/public/share.php

index 558efb49c0bddb985e4e4e7417ae0e0510fa548f..19f7b2a20a97c466d3b679517676d632ecff9f26 100644 (file)
@@ -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(