From cd0bba6dfad66be00268719a66f80f1bf965d114 Mon Sep 17 00:00:00 2001 From: ambethia Date: Mon, 12 Mar 2007 16:29:20 +0000 Subject: [PATCH] Fixed a minor bug that left the rotation index full of expired filenames. --- lib/backup/s3_helpers.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/backup/s3_helpers.rb b/lib/backup/s3_helpers.rb index 2389d11..b364370 100644 --- a/lib/backup/s3_helpers.rb +++ b/lib/backup/s3_helpers.rb @@ -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 @@ -78,6 +78,8 @@ def cleanup(generation, keep) extra_key = keys.shift delete extra_key end + # store updated index + self.rotation = keys end private