4088: filter only on files
authorTim Pierce <twp@curoverse.com>
Wed, 29 Oct 2014 15:40:52 +0000 (11:40 -0400)
committerTim Pierce <twp@curoverse.com>
Wed, 29 Oct 2014 15:40:52 +0000 (11:40 -0400)
Only apply the regex filter to files; continue to process subdirectories
as normal in order to keep the appropriate filename hierarchy.

apps/workbench/app/views/collections/_show_files.html.erb

index 327c1ae61abd5ed6321f31f8ab779c995ca8baf9..9cd77b02e1a51a21c05291a5907699fb88aa24fd 100644 (file)
@@ -55,7 +55,7 @@
   <% file_tree.reject { |(dirname, filename, size)|
        # Eliminate any files that don't match file_regex
        # (or accept all files if no file_regex was given)
-       file_regex and !file_regex.match(filename)
+       size and file_regex and !file_regex.match(filename)
        }
        .take(10000)
        .each_with_index do |(dirname, filename, size), index| %>