* mount.cc (mount_entries): Handle a "/" cygdrive prefix correctly.
Add comments.
This commit is contained in:
parent
753a03bf8e
commit
8262e64256
@ -1,3 +1,8 @@
|
|||||||
|
2009-03-02 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* mount.cc (mount_entries): Handle a "/" cygdrive prefix correctly.
|
||||||
|
Add comments.
|
||||||
|
|
||||||
2009-02-23 Sjors Gielen <mailinglist@dazjorz.com>
|
2009-02-23 Sjors Gielen <mailinglist@dazjorz.com>
|
||||||
|
|
||||||
* Makefile.in: Add DESTDIR functionality.
|
* Makefile.in: Add DESTDIR functionality.
|
||||||
|
@ -386,9 +386,15 @@ mount_entries (void)
|
|||||||
char opts[strlen (p->mnt_opts) + 1];
|
char opts[strlen (p->mnt_opts) + 1];
|
||||||
|
|
||||||
convert_spaces (dirname, p->mnt_dir);
|
convert_spaces (dirname, p->mnt_dir);
|
||||||
|
// remove trailing slash
|
||||||
char *ls = strrchr (dirname, '/');
|
char *ls = strrchr (dirname, '/');
|
||||||
if (ls && ls > dirname)
|
if (ls)
|
||||||
*ls = '\0';
|
{
|
||||||
|
// last slash == leading slash? cygdrive prefix == "/"
|
||||||
|
if (ls == dirname)
|
||||||
|
++ls;
|
||||||
|
*ls = '\0';
|
||||||
|
}
|
||||||
*stpncpy (opts, p->mnt_opts, noumount - p->mnt_opts) = '\0';
|
*stpncpy (opts, p->mnt_opts, noumount - p->mnt_opts) = '\0';
|
||||||
printf (format_cyg, dirname, opts);
|
printf (format_cyg, dirname, opts);
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user