X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2ecfd61ee9e7f1905638474b98b14b5597409fe6..097449d8e190fe5c19aea5af816d25241b3dd591:/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)