From 57505a676083a77cf44f683f65281c7fff5bf6fb Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 29 Dec 2010 15:53:15 -0700 Subject: [PATCH] mountlist: tweak previous commit * lib/mountlist.c (me_remote): Guarantee trailing backslash. Reported by Paul Eggert. Signed-off-by: Eric Blake --- ChangeLog | 4 ++++ lib/mountlist.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) 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: -- 2.11.0