Permalink
Browse files

S3 blob storage gateway: deleting an index named x destroys data for …

…any index with name beginning with x, closes #2.
  • Loading branch information...
1 parent b0ef8c6 commit 2cbf07e5b6ad7323ddda55f9888c306f405466f7 @kimchy kimchy committed Jan 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/org/elasticsearch/cloud/aws/blobstore/S3BlobStore.java
@@ -100,7 +100,7 @@ public void delete(BlobPath path) {
if (prevListing != null) {
list = client.listNextBatchOfObjects(prevListing);
} else {
- list = client.listObjects(bucket, path.buildAsString("/"));
+ list = client.listObjects(bucket, path.buildAsString("/") + "/");
}
for (S3ObjectSummary summary : list.getObjectSummaries()) {
client.deleteObject(summary.getBucketName(), summary.getKey());

0 comments on commit 2cbf07e

Please sign in to comment.