diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-02-28 11:09:49 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-02-28 11:09:49 +0100 |
commit | c6450c974f4ff8520113d727d58fa74f474cd913 (patch) | |
tree | 155aec06207a1aa60c3552b6ad35dabe246f43ee | |
parent | c8dc01dc8030a697cd3ee47da6381066d3142265 (diff) | |
download | busybox-w32-c6450c974f4ff8520113d727d58fa74f474cd913.tar.gz busybox-w32-c6450c974f4ff8520113d727d58fa74f474cd913.tar.bz2 busybox-w32-c6450c974f4ff8520113d727d58fa74f474cd913.zip |
mount: strip multiple trailing slashes, not just one
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | util-linux/mount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index 0127f1958..989e5d1a8 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -565,7 +565,7 @@ static int mount_it_now(struct mntent *mp, long vfsflags, char *filteropts) | |||
565 | // Remove trailing / (if any) from directory we mounted on | 565 | // Remove trailing / (if any) from directory we mounted on |
566 | i = strlen(mp->mnt_dir) - 1; | 566 | i = strlen(mp->mnt_dir) - 1; |
567 | while (i > 0 && mp->mnt_dir[i] == '/') | 567 | while (i > 0 && mp->mnt_dir[i] == '/') |
568 | mp->mnt_dir[i] = '\0'; | 568 | mp->mnt_dir[i--] = '\0'; |
569 | 569 | ||
570 | // Convert to canonical pathnames as needed | 570 | // Convert to canonical pathnames as needed |
571 | mp->mnt_dir = bb_simplify_path(mp->mnt_dir); | 571 | mp->mnt_dir = bb_simplify_path(mp->mnt_dir); |