From aa094d1b57c15f99d9f66a29fe85f8d775cd13f8 Mon Sep 17 00:00:00 2001 From: Anush008 Date: Sat, 9 Dec 2023 07:06:56 +0530 Subject: [PATCH] feat: download snapshots --- src/main/java/io/qdrant/client/QdrantClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/qdrant/client/QdrantClient.java b/src/main/java/io/qdrant/client/QdrantClient.java index bee2054e..7e776ef7 100644 --- a/src/main/java/io/qdrant/client/QdrantClient.java +++ b/src/main/java/io/qdrant/client/QdrantClient.java @@ -1374,7 +1374,7 @@ public void downloadSnapshot( if (response.getStatusLine().getStatusCode() == 200) { HttpEntity entity = response.getEntity(); if (entity != null) { - Files.write(outPath, EntityUtils.toByteArray(entity), StandardOpenOption.WRITE); + Files.write(outPath, EntityUtils.toByteArray(entity), StandardOpenOption.CREATE_NEW); System.out.println("Downloaded successfully"); } else { System.err.println("No response body");