mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2025-01-11 00:21:45 +00:00
Enhanced bucket/path parameter check
This commit is contained in:
parent
7d09914f1f
commit
1fe0334c08
@ -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