class Mixlib::Archive::Tar
def reader(&block)
def reader(&block) raw = File.open(archive, "rb") file = if is_gzip_file?(archive) Mixlib::Archive::Log.debug "gzip file detected" Zlib::GzipReader.wrap(raw) else raw end Gem::Package::TarReader.new(file, &block) ensure if file file.close unless file.closed? file = nil end if raw raw.close unless raw.closed? raw = nil end end