From ad37488d059ab51b5dc9c3a917cb688eb5c6b418 Mon Sep 17 00:00:00 2001 From: grosser Date: Tue, 24 Sep 2013 13:47:47 -0700 Subject: [PATCH] do now blow up with undefined method full --- lib/s3ranger/sync.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/s3ranger/sync.rb b/lib/s3ranger/sync.rb index 74c4e1d..4730312 100644 --- a/lib/s3ranger/sync.rb +++ b/lib/s3ranger/sync.rb @@ -307,7 +307,6 @@ def upload_files remote, list end def remove_files remote, list - if @args.verbose list.each {|e| puts " - #{remote}#{e.path}" @@ -315,7 +314,7 @@ def remove_files remote, list end unless @args.dry_run - @args.s3.buckets[remote.bucket].objects.delete_if { |obj| list.include? obj.key } + @args.s3.buckets[remote.bucket].objects.delete_if { |obj| list.map(&:path).include? obj.key } end end