diff --git a/s3fs/s3fs.cpp b/s3fs/s3fs.cpp index c3cad77..893ba0e 100644 --- a/s3fs/s3fs.cpp +++ b/s3fs/s3fs.cpp @@ -1733,6 +1733,14 @@ my_fuse_opt_proc(void *data, const char *arg, int key, struct fuse_args *outargs return 1; } +string StringToLower(string strToConvert) { + //change each element of the string to lower case + for(unsigned int i = 0; i< strToConvert.length(); i++) { + strToConvert[i] = tolower(strToConvert[i]); + } + return strToConvert; +} + static struct fuse_operations s3fs_oper; int @@ -1747,6 +1755,11 @@ main(int argc, char *argv[]) { exit(1); } + if ( StringToLower(bucket) != bucket ) { + cout << argv[0] << ": bucket \"" << bucket.c_str() << "\" - buckets with upper case characters in their names are not supported" << endl; + exit(1); + } + if (AWSSecretAccessKey.size() == 0) { string line; ifstream passwd("/etc/passwd-s3fs");