From ac17e24feca48ee347fc1dbd376beaee7907a75c Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Wed, 10 Aug 2016 23:45:57 -0400 Subject: add dir? --- spec/zip_spec.cr | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'spec') diff --git a/spec/zip_spec.cr b/spec/zip_spec.cr index 01a98ff..0ca4e86 100644 --- a/spec/zip_spec.cr +++ b/spec/zip_spec.cr @@ -91,12 +91,15 @@ describe Zip do it "reads all an archive's compressed entries" do Zip.read(File.join(TEST_DIR, "test-many.zip")) do |zip| zip.each do |e| - pp e.path - io = MemoryIO.new - # e.write(STDOUT) - e.write(io) - io.close + if e.dir? + puts "#{e.path} is a directory" + else + io = MemoryIO.new + # e.write(STDOUT) + e.write(io) + io.close + end end end end -- cgit v1.2.3