diff --git a/lib/s3ranger/sync.rb b/lib/s3ranger/sync.rb index 74c4e1d..f6dbc8d 100644 --- a/lib/s3ranger/sync.rb +++ b/lib/s3ranger/sync.rb @@ -275,7 +275,7 @@ def self.process_destination source, destination def read_tree_remote location dir = location.path - dir += '/' if not dir.empty? or dir.end_with?('/') + dir += '/' if not dir.empty? and not dir.end_with?('/') @args.s3.buckets[location.bucket].objects.with_prefix(dir || "").to_a.collect {|obj| Node.new location.path, obj.key, obj.content_length }