X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/55aafbb07904ca24390dd47ea960eae7cb2b909a..a2bfb6d9f3d9e8675a644e9cc9a1bbcdc79f71e6:/apps/workbench/app/models/collection.rb diff --git a/apps/workbench/app/models/collection.rb b/apps/workbench/app/models/collection.rb index 09af60fb9c..f5aef841ea 100644 --- a/apps/workbench/app/models/collection.rb +++ b/apps/workbench/app/models/collection.rb @@ -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