From 2490fdc4961c2b78c8dd57db4ee29431dedde2ef Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 16 Dec 2020 11:17:51 +0000 Subject: [PATCH 1/1] Ignore GPX archive entries that aren't regular files Fixes #3008 --- lib/gpx.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.39.5