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
1 changed files with 2 additions and 4 deletions

View File

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