Fix the mimetype filter in OC_Share_Backend_File
This commit is contained in:
parent
ee77ef86d3
commit
11bdc8baa8
1 changed files with 4 additions and 2 deletions
|
@ -72,12 +72,14 @@ class OC_Share_Backend_File implements OCP\Share_Backend_File_Dependent {
|
|||
// Only 1 item should come through for this format call
|
||||
return array('path' => $items[key($items)]['path'], 'permissions' => $items[key($items)]['permissions']);
|
||||
} else if ($format == self::FORMAT_FILE_APP) {
|
||||
if (isset($parameters['mimetype_filter'])) {
|
||||
if (isset($parameters['mimetype_filter']) && $parameters['mimetype_filter']) {
|
||||
$mimetype_filter = $parameters['mimetype_filter'];
|
||||
}
|
||||
$files = array();
|
||||
foreach ($items as $item) {
|
||||
if (isset($mimetype_filter) && strpos($item['mimetype'], $mimetype_filter) !== 0) {
|
||||
if (isset($mimetype_filter)
|
||||
&& strpos($item['mimetype'], $mimetype_filter) !== 0
|
||||
&& $item['mimetype'] != 'httpd/unix-directory') {
|
||||
continue;
|
||||
}
|
||||
$file = array();
|
||||
|
|
Loading…
Reference in a new issue