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.
This commit is contained in:
Andrew Gaul 2021-07-25 12:29:00 +09:00 committed by GitHub
parent 77f0b75d2f
commit d3278f4886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();