summaryrefslogtreecommitdiff
path: root/plugins/repository-azure
diff options
context:
space:
mode:
authorTanguy Leroux <tlrx.dev@gmail.com>2016-05-19 14:53:22 +0200
committerTanguy Leroux <tlrx.dev@gmail.com>2016-05-23 10:50:40 +0200
commite7eb664c78dce2451dbeb55db0c0b761a65b295b (patch)
treeae087f116b8ff480a57e8b3dcde5cb36a76867a4 /plugins/repository-azure
parentb0b503035ab35e8c2d2c4dcdc936e76b509c6ff3 (diff)
Change BlobPath.buildAsString() method
Diffstat (limited to 'plugins/repository-azure')
-rw-r--r--plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobContainer.java6
-rw-r--r--plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobStore.java6
2 files changed, 2 insertions, 10 deletions
diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobContainer.java b/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobContainer.java
index cf25e5d8b7..23f1b12c21 100644
--- a/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobContainer.java
+++ b/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobContainer.java
@@ -52,11 +52,7 @@ public class AzureBlobContainer extends AbstractBlobContainer {
public AzureBlobContainer(String repositoryName, BlobPath path, AzureBlobStore blobStore) {
super(path);
this.blobStore = blobStore;
- String keyPath = path.buildAsString("/");
- if (!keyPath.isEmpty()) {
- keyPath = keyPath + "/";
- }
- this.keyPath = keyPath;
+ this.keyPath = path.buildAsString();
this.repositoryName = repositoryName;
}
diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobStore.java b/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobStore.java
index 85baf00b90..2809b8588f 100644
--- a/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobStore.java
+++ b/plugins/repository-azure/src/main/java/org/elasticsearch/cloud/azure/blobstore/AzureBlobStore.java
@@ -85,11 +85,7 @@ public class AzureBlobStore extends AbstractComponent implements BlobStore {
@Override
public void delete(BlobPath path) {
- String keyPath = path.buildAsString("/");
- if (!keyPath.isEmpty()) {
- keyPath = keyPath + "/";
- }
-
+ String keyPath = path.buildAsString();
try {
this.client.deleteFiles(this.accountName, this.locMode, container, keyPath);
} catch (URISyntaxException | StorageException e) {