mountlist: tweak previous commit
authorEric Blake <eblake@redhat.com>
Wed, 29 Dec 2010 22:53:15 +0000 (15:53 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 29 Dec 2010 22:53:39 +0000 (15:53 -0700)
* lib/mountlist.c (me_remote): Guarantee trailing backslash.
Reported by Paul Eggert.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
lib/mountlist.c

index f9aff45eb47b6f77e6096473ea1c3fbc477a1257..2e12c65a4e4bb7914c1a0598304d9295c14c403e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2010-12-29  Eric Blake  <eblake@redhat.com>
 
+       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.
index 126f43ddc82baef9c5e8f7c47d540362446428b8..96e2b269f010e586bb6f325fa1d4cfb1d93d7a5b 100644 (file)
@@ -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: