lib/vfs/entries/dir.rb in vfs-0.5.0 vs lib/vfs/entries/dir.rb in vfs-0.5.1
- old
+ new
@@ -72,9 +72,10 @@
driver.each_entry path, query do |name, type|
# For performance reasons some drivers may return the type of entry as
# optionally evaluated callback.
type = type.call if (filter or type_required) and type.is_a?(Proc)
+ next if name == '' # Fix for https://github.com/alexeypetrushin/vfs/issues/5
next if filter and (filter != type)
entry = if type == :dir
dir(name)
elsif type == :file
\ No newline at end of file