Skip to content

Commit 2ca11c5

Browse files
author
Ilja Bobkevic
committed
Merge pull request #41 from danilopopeye/fix-paxheaders-error
#31 - only read files from tar object
2 parents a47ccf4 + 0e80058 commit 2ca11c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet_forge_server/utils/archiver.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def read_from_archive(archive, name_regex)
2424
tar.rewind
2525
files = {}
2626
tar.each do |obj|
27-
files[obj.full_name] = obj.read if obj.full_name =~ name_regex
27+
files[obj.full_name] = obj.read if obj.file? && obj.full_name =~ name_regex
2828
end
2929
return files unless files.empty?
3030
raise "Given name #{name_regex} not found in #{archive}"

0 commit comments

Comments
 (0)