mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-05 12:27:53 +00:00
Resolves issue #98 - s3fs fails silently for bucket with
upper case letters. Research shows that many S3 tools do not support buckets whose names contain uppercase characters -- s3fs appears to be no different. However, s3fs allows a bucket of this type to be mounted even though access to it results in a "Input/output error" Rather than put support in for these buckets, it's easier to inform the user of the offending bucket name and die. git-svn-id: http://s3fs.googlecode.com/svn/trunk@203 df820570-a93a-0410-bd06-b72b767a4274
This commit is contained in:
parent
788a4ff542
commit
05bc0fb42b
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user