Skip to content

Commit

Permalink
Fixed a minor bug that left the rotation index full of expired filena…
Browse files Browse the repository at this point in the history
…mes.
  • Loading branch information
ambethia committed Mar 12, 2007
1 parent 2bb5edb commit cd0bba6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/backup/s3_helpers.rb
Expand Up @@ -57,7 +57,7 @@ def delete(object_key)
# Create it if it does not exist
def verify_rotation_hierarchy_exists(hierarchy)
begin
index = rotation
index = self.rotation
verified_index = index.merge(init_rotation_index(hierarchy)) { |m,x,y| x ||= y }
unless (verified_index == index)
self.rotation = verified_index
Expand All @@ -78,6 +78,8 @@ def cleanup(generation, keep)
extra_key = keys.shift
delete extra_key
end
# store updated index
self.rotation = keys
end

private
Expand Down

0 comments on commit cd0bba6

Please sign in to comment.