X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/88ba316abeecffccd1cb51c63ce5594c95023624..5761371a561f785e17e5403cd47f76ecd3604eff:/lib/gpx.rb diff --git a/lib/gpx.rb b/lib/gpx.rb index d0607233a..86cf2f49d 100644 --- a/lib/gpx.rb +++ b/lib/gpx.rb @@ -44,8 +44,8 @@ module GPX @tracksegs = 0 begin - Archive::Reader.open_filename(@file).each_entry_with_data do |_entry, data| - parse_file(XML::Reader.string(data), &block) + Archive::Reader.open_filename(@file).each_entry_with_data do |entry, data| + parse_file(XML::Reader.string(data), &block) if entry.regular? end rescue Archive::Error io = ::File.open(@file)