Skip to content

Commit 5e50345

Browse files
committed
Fixed a bug when end of path for mount point is multi slash.
1 parent 4f49b41 commit 5e50345

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/s3fs.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -3710,10 +3710,8 @@ static int set_bucket(const char* arg)
37103710
return -1;
37113711
}
37123712
mount_prefix = pmount_prefix;
3713-
// remove trailing slash
3714-
if(mount_prefix[mount_prefix.size() - 1] == '/'){
3715-
mount_prefix.erase(mount_prefix.size() - 1);
3716-
}
3713+
// Trim the last consecutive '/'
3714+
mount_prefix = trim_right(mount_prefix, "/");
37173715
}
37183716
}else{
37193717
if(!S3fsCred::SetBucket(arg)){

0 commit comments

Comments
 (0)