Merge branch 'master' into 13306-arvados-cwl-runner-py3-support
[arvados.git] / apps / workbench / app / models / collection.rb
index 09af60fb9cc5f18a9102d02ed8133e6651f5ecc9..f5aef841ea47a6bfc66e84bccbaa86c617267a3f 100644 (file)
@@ -68,8 +68,8 @@ class Collection < ArvadosBase
         .sort.flat_map do |parts|
         [parts + [nil]] + dir_to_tree.call(File.join(parts))
       end
-      # Then extend that list with files in this directory.
-      subnodes + tree[File.split(dirname)]
+      # Then extend that list with files in this directory, except the empty dir placeholders (0:0:. files).
+      subnodes + tree[File.split(dirname)].reject { |_, basename, size| (basename == '.') and (size == 0) }
     end
     dir_to_tree.call('.')
   end