mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-16 01:07:11 +00:00
Merge pull request #580 from ggtakec/master
Enhanced bucket/path parameter check
This commit is contained in:
commit
73da168b93
@ -4222,6 +4222,10 @@ static int set_bucket(const char* arg)
|
|||||||
{
|
{
|
||||||
char *bucket_name = (char*)arg;
|
char *bucket_name = (char*)arg;
|
||||||
if(strstr(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, ":");
|
bucket = strtok(bucket_name, ":");
|
||||||
char* pmount_prefix = strtok(NULL, ":");
|
char* pmount_prefix = strtok(NULL, ":");
|
||||||
if(pmount_prefix){
|
if(pmount_prefix){
|
||||||
|
Loading…
Reference in New Issue
Block a user