lib/inspec/file_provider.rb in inspec-4.18.0 vs lib/inspec/file_provider.rb in inspec-4.18.24
- old
+ new
@@ -169,10 +169,10 @@
!name.include?("PaxHeader/"))
path = Pathname.new(name).relative_path_from(here).to_s
@contents[path] = begin # not ||= in a tarball, last one wins
- res = entry.read
+ res = entry.read || ""
try = res.dup
try.force_encoding Encoding::UTF_8
res = try if try.valid_encoding?
res
end