From d3278f488676990560ed0d4066220ee4f00183ec Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Sun, 25 Jul 2021 12:29:00 +0900 Subject: [PATCH] Loosen CheckBucket to check only the bucket (#1728) Previously it checked if there was an object present, assuming that this was a directory object normally created for s3fs directories. However most S3 clients do not create this object for virtual folders. Fixes #1460. Fixes #1687. --- src/curl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/curl.cpp b/src/curl.cpp index 5eeda1d..40f7b8a 100644 --- a/src/curl.cpp +++ b/src/curl.cpp @@ -3397,11 +3397,11 @@ int S3fsCurl::CheckBucket() } std::string resource; std::string turl; - MakeUrlResource(get_realpath("/").c_str(), resource, turl); + MakeUrlResource("/", resource, turl); turl += urlargs; url = prepare_url(turl.c_str()); - path = get_realpath("/"); + path = "/"; // Only check the presence of the bucket, not the entire virtual path. requestHeaders = NULL; responseHeaders.clear(); bodydata.Clear();