lib/zip_dir/zip.rb in zip_dir-0.1.1 vs lib/zip_dir/zip.rb in zip_dir-0.1.2
- old
+ new
@@ -23,10 +23,11 @@
end
protected
def zip_path(zip_io, relative_path="")
entries = Dir.entries(relative_path.empty? ? source_path : File.join(source_path, relative_path))
- entries.shift(2)
+ entries.delete(".")
+ entries.delete("..")
entries.each do |entry|
relative_entry_path = relative_path.empty? ? entry : File.join(relative_path, entry)
source_entry_path = File.join(source_path, relative_entry_path)
if File.directory?(source_entry_path)
\ No newline at end of file