Merge pull request #580 from ggtakec/master

Enhanced bucket/path parameter check
This commit is contained in:
Takeshi Nakatani 2017-05-06 05:13:05 +09:00 committed by GitHub
commit 73da168b93

View File

@ -4222,6 +4222,10 @@ static int set_bucket(const char* arg)
{
char *bucket_name = (char*)arg;
if(strstr(arg, ":")){
if(strstr(arg, "://")){
S3FS_PRN_EXIT("bucket name and path(\"%s\") is wrong, it must be \"bucket[:/path]\".", arg);
return -1;
}
bucket = strtok(bucket_name, ":");
char* pmount_prefix = strtok(NULL, ":");
if(pmount_prefix){