diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-12-02 16:48:15 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-12-03 13:09:13 +0100 |
commit | 19b2fe6a3ab4d9ded3c6974ac109d5d5b02251bb (patch) | |
tree | 358b0d40c401b61e0a5ac81b995c4e4a8db0fea1 /lib | |
parent | df5872ec50a68de5d99bd6b5cf17ceb94f2ef833 (diff) | |
download | nextcloud-server-19b2fe6a3ab4d9ded3c6974ac109d5d5b02251bb.tar.gz nextcloud-server-19b2fe6a3ab4d9ded3c6974ac109d5d5b02251bb.zip |
Fix mimetype filter in getDirectoryContent
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/view.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 7854790d0e5..6abefff4198 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -1427,13 +1427,9 @@ class View { if ($mimetype_filter) { $files = array_filter($files, function (FileInfo $file) use ($mimetype_filter) { if (strpos($mimetype_filter, '/')) { - if ($file->getMimetype() === $mimetype_filter) { - $result[] = $file; - } + return $file->getMimetype() === $mimetype_filter; } else { - if ($file->getMimePart() === $mimetype_filter) { - $result[] = $file; - } + return $file->getMimePart() === $mimetype_filter; } }); } |