From f8f484a5e0a364572161b16ae79fb62b1f0926df Mon Sep 17 00:00:00 2001 From: richie Date: Mon, 6 Jul 2020 12:44:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8D=8E=E4=B8=BA=E4=BA=91?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fanruan/fs/s3/repository/core/S3ResourceRepository.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/fanruan/fs/s3/repository/core/S3ResourceRepository.java b/src/main/java/com/fanruan/fs/s3/repository/core/S3ResourceRepository.java index 99b549a..1572824 100644 --- a/src/main/java/com/fanruan/fs/s3/repository/core/S3ResourceRepository.java +++ b/src/main/java/com/fanruan/fs/s3/repository/core/S3ResourceRepository.java @@ -165,7 +165,7 @@ public class S3ResourceRepository extends BaseResourceRepository { @Override public boolean exist(String path) { try { - return s3.listObjectsV2(bucket, path).getKeyCount() > 0; + return !s3.listObjects(bucket, path).getObjectSummaries().isEmpty(); } catch (Exception e) { return false; }