]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix detecting deleted shares in object store 3783/head
authorAndrius <andrius.kulbis@ktu.lt>
Thu, 9 Mar 2017 12:36:20 +0000 (14:36 +0200)
committerGitHub <noreply@github.com>
Thu, 9 Mar 2017 12:36:20 +0000 (14:36 +0200)
While using the object store, the shares, that are moved to trashbin were still detected as accessible and cause broken shares to be shown in file/folder listing.

lib/private/Share20/DefaultShareProvider.php

index 23e8db34d7f4e1919174b47029b2d23c74f1e149..fe6472c31a09af40599355a49d5fd5d1c387075e 100644 (file)
@@ -642,7 +642,8 @@ class DefaultShareProvider implements IShareProvider {
                // exclude shares leading to trashbin on home storages
                $pathSections = explode('/', $data['path'], 2);
                // FIXME: would not detect rare md5'd home storage case properly
-               if ($pathSections[0] !== 'files' && explode(':', $data['storage_string_id'], 2)[0] === 'home') {
+               if ($pathSections[0] !== 'files' 
+                       && in_array(explode(':', $data['storage_string_id'], 2)[0], array('home', 'object'))) {
                        return false;
                }
                return true;