Fixed a bug when end of path for mount point is multi slash (#2057)

This commit is contained in:
Takeshi Nakatani 2022-11-19 15:07:27 +09:00 committed by GitHub
parent 23a5583a7f
commit 465986e397
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4179,10 +4179,8 @@ static int set_bucket(const char* arg)
return -1; return -1;
} }
mount_prefix = pmount_prefix; mount_prefix = pmount_prefix;
// remove trailing slash // Trim the last consecutive '/'
if(mount_prefix[mount_prefix.size() - 1] == '/'){ mount_prefix = trim_right(mount_prefix, "/");
mount_prefix.erase(mount_prefix.size() - 1);
}
} }
}else{ }else{
if(!S3fsCred::SetBucket(arg)){ if(!S3fsCred::SetBucket(arg)){