Fix detecting deleted shares in object store

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.
This commit is contained in:
Andrius 2017-03-09 14:36:20 +02:00 committed by GitHub
parent 6d10a2aece
commit 708b62f223
1 changed files with 2 additions and 1 deletions

View File

@ -642,7 +642,8 @@ class DefaultShareProvider implements IShareProvider {
// exclude shares leading to trashbin on home storages // exclude shares leading to trashbin on home storages
$pathSections = explode('/', $data['path'], 2); $pathSections = explode('/', $data['path'], 2);
// FIXME: would not detect rare md5'd home storage case properly // 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 false;
} }
return true; return true;