Skip to content

Commit 1589792

Browse files
gfyoungAli Beyad
authored andcommitted
Changed Files.deleteIfExists to Files.delete in FsBlobContainer
1 parent 1950411 commit 1589792

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

core/src/main/java/org/elasticsearch/common/blobstore/fs/FsBlobContainer.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,7 @@ public Map<String, BlobMetaData> listBlobsByPrefix(String blobNamePrefix) throws
8585
@Override
8686
public void deleteBlob(String blobName) throws IOException {
8787
Path blobPath = path.resolve(blobName);
88-
if (!Files.deleteIfExists(blobPath)) {
89-
// blobPath does not exist
90-
throw new IOException("File [" + blobPath.toString() + "] does not exist");
91-
}
88+
Files.delete(blobPath);
9289
}
9390

9491
@Override

0 commit comments

Comments
 (0)