mirror of
https://github.com/sheumann/hush.git
synced 2024-12-23 20:29:42 +00:00
mount: strip multiple trailing slashes, not just one
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
c8dc01dc80
commit
c6450c974f
@ -565,7 +565,7 @@ static int mount_it_now(struct mntent *mp, long vfsflags, char *filteropts)
|
||||
// Remove trailing / (if any) from directory we mounted on
|
||||
i = strlen(mp->mnt_dir) - 1;
|
||||
while (i > 0 && mp->mnt_dir[i] == '/')
|
||||
mp->mnt_dir[i] = '\0';
|
||||
mp->mnt_dir[i--] = '\0';
|
||||
|
||||
// Convert to canonical pathnames as needed
|
||||
mp->mnt_dir = bb_simplify_path(mp->mnt_dir);
|
||||
|
Loading…
Reference in New Issue
Block a user