emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/w32proc.c,v


From: Jason Rumney
Subject: [Emacs-diffs] Changes to emacs/src/w32proc.c,v
Date: Tue, 22 Jul 2008 15:28:21 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Jason Rumney <jasonr>   08/07/22 15:28:21

Index: w32proc.c
===================================================================
RCS file: /sources/emacs/emacs/src/w32proc.c,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- w32proc.c   27 Jun 2008 07:34:53 -0000      1.83
+++ w32proc.c   22 Jul 2008 15:28:21 -0000      1.84
@@ -1799,9 +1799,14 @@
      Lisp_Object filename;
 {
   char longname[ MAX_PATH ];
+  int drive_only = 0;
 
   CHECK_STRING (filename);
 
+  if (SBYTES (filename) == 2
+      && *(SDATA (filename) + 1) == ':')
+    drive_only = 1;
+
   /* first expand it.  */
   filename = Fexpand_file_name (filename, Qnil);
 
@@ -1810,6 +1815,12 @@
 
   CORRECT_DIR_SEPS (longname);
 
+  /* If we were passed only a drive, make sure that a slash is not appended
+     for consistency with directories.  Allow for drive mapping via SUBST
+     in case expand-file-name is ever changed to expand those.  */
+  if (drive_only && longname[1] == ':' && longname[2] == '/' && !longname[3])
+    longname[2] = '\0';
+
   return build_string (longname);
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]