* 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>
|
||||
|
||||
* Makefile.in: Add DESTDIR functionality.
|
||||
|
|
|
@ -386,9 +386,15 @@ mount_entries (void)
|
|||
char opts[strlen (p->mnt_opts) + 1];
|
||||
|
||||
convert_spaces (dirname, p->mnt_dir);
|
||||
// remove trailing slash
|
||||
char *ls = strrchr (dirname, '/');
|
||||
if (ls && ls > dirname)
|
||||
*ls = '\0';
|
||||
if (ls)
|
||||
{
|
||||
// last slash == leading slash? cygdrive prefix == "/"
|
||||
if (ls == dirname)
|
||||
++ls;
|
||||
*ls = '\0';
|
||||
}
|
||||
*stpncpy (opts, p->mnt_opts, noumount - p->mnt_opts) = '\0';
|
||||
printf (format_cyg, dirname, opts);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue