From: Eric Blake Date: Wed, 29 Dec 2010 22:53:15 +0000 (-0700) Subject: mountlist: tweak previous commit X-Git-Tag: v0.1~3431 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=57505a676083a77cf44f683f65281c7fff5bf6fb;p=gnulib.git mountlist: tweak previous commit * lib/mountlist.c (me_remote): Guarantee trailing backslash. Reported by Paul Eggert. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index f9aff45eb..2e12c65a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-12-29 Eric Blake + mountlist: tweak previous commit + * lib/mountlist.c (me_remote): Guarantee trailing backslash. + Reported by Paul Eggert. + mountlist: fix local drive detection on cygwin * lib/mountlist.c (ME_REMOTE) [__CYGWIN__]: Provide implementation that works for cygwin. diff --git a/lib/mountlist.c b/lib/mountlist.c index 126f43ddc..96e2b269f 100644 --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -166,7 +166,8 @@ me_remote (char const *fs_name, char const *fs_type _GL_UNUSED) { if (fs_name[0] && fs_name[1] == ':') { - char const drive[3] = { fs_name[0], ':', '\0' }; + char drive[4]; + sprintf (drive, "%c:\\", fs_name[0]); switch (GetDriveType (drive)) { case DRIVE_REMOVABLE: