From ca1df8c3c525dd200836733feca05b8986267e01 Mon Sep 17 00:00:00 2001 From: "matthew.hubble" Date: Fri, 6 Jun 2014 08:38:14 +0100 Subject: [PATCH] Remove bucket from buckets array when deleting a bucket. This fixes a bug where a deleted bucket will still be returned in a list bucket request --- lib/fakes3/file_store.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/fakes3/file_store.rb b/lib/fakes3/file_store.rb index 10546a8e..249ad81d 100644 --- a/lib/fakes3/file_store.rb +++ b/lib/fakes3/file_store.rb @@ -68,6 +68,7 @@ def delete_bucket(bucket_name) raise NoSuchBucket if !bucket raise BucketNotEmpty if bucket.objects.count > 0 FileUtils.rm_r(get_bucket_folder(bucket)) + @buckets.delete(bucket) @bucket_hash.delete(bucket_name) end