diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-09-21 23:17:12 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-09-21 23:17:12 +0200 |
commit | 11bdc8baa88ebb56cef25c0dd45dbd26268f97b4 (patch) | |
tree | 6a542454fd64c4a73c840c408394390cefdd41aa /apps/files_sharing/lib/share/file.php | |
parent | ee77ef86d30942cf9b72ce1a496dbf595807198e (diff) | |
download | nextcloud-server-11bdc8baa88ebb56cef25c0dd45dbd26268f97b4.tar.gz nextcloud-server-11bdc8baa88ebb56cef25c0dd45dbd26268f97b4.zip |
Fix the mimetype filter in OC_Share_Backend_File
Diffstat (limited to 'apps/files_sharing/lib/share/file.php')
-rw-r--r-- | apps/files_sharing/lib/share/file.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/share/file.php b/apps/files_sharing/lib/share/file.php index 6409c43e134..074ca9928d4 100644 --- a/apps/files_sharing/lib/share/file.php +++ b/apps/files_sharing/lib/share/file.php @@ -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(); |