Fix empty mime type filter
Fix empty mime type filter

When the mime type is an empty array no filter should be applied.
However, the filter was loosely compared to an empty array, but as
arrays are objects then it became an implicit strict equality comparison
which always failed due to being different objects. Now the length of
the array is compared instead, and also moved outside the loop as it is
not needed to check it for each file.

Signed-off-by: Daniel Calviño Sánchez <bd7629e975cc0e00ea7cda4ab6a120f2ee42ac1b@gmail.com>

andreas-p/nextcloud-server,nextcloud/server,andreas-p/nextcloud-server,nextcloud/server,andreas-p/nextcloud-server,andreas-p/nextcloud-server,nextcloud/server,andreas-p/nextcloud-server,nextcloud/server