From d120e542848eb98e0d9eb7113b63720bec3064df Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Tue, 15 Aug 2023 21:31:05 +0900 Subject: [PATCH] Improve illegal bucket name error message (#2263) This may help users debug situations like: https://stackoverflow.com/questions/76359564/why-does-mounting-s3fs-bucket-on-centos-7-using-fstab-fail-but-mount-a-works --- src/s3fs_cred.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s3fs_cred.cpp b/src/s3fs_cred.cpp index e3c2f29..31f499a 100644 --- a/src/s3fs_cred.cpp +++ b/src/s3fs_cred.cpp @@ -1536,7 +1536,7 @@ bool S3fsCred::CheckForbiddenBucketParams() // check bucket name for illegal characters size_t found = bucket_name.find_first_of("/:\\;!@#$%^&*?|+="); if(found != std::string::npos){ - S3FS_PRN_EXIT("BUCKET %s -- bucket name contains an illegal character.", bucket_name.c_str()); + S3FS_PRN_EXIT("BUCKET %s -- bucket name contains an illegal character: '%c' at position %zu", bucket_name.c_str(), bucket_name[found], found); return false; }