Skip to content

Commit

Permalink
Merge pull request clarete#10 from grosser/remove
Browse files Browse the repository at this point in the history
do now blow up with undefined method full
  • Loading branch information
clarete committed Sep 24, 2013
2 parents 8f263fd + ad37488 commit a3d9ab6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/s3ranger/sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,14 @@ def upload_files remote, list
end

def remove_files remote, list

if @args.verbose
list.each {|e|
puts " - #{remote}#{e.path}"
}
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

Expand Down

0 comments on commit a3d9ab6

Please sign in to comment.