aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2008-07-22 15:28:21 +0000
committerJason Rumney2008-07-22 15:28:21 +0000
commit8dcaeba2063164d2dfe11cfe0786fcb4c95d7105 (patch)
tree0dc4eb6f973c4995d7dbde263d7188de0bee6445 /src
parentdf2142db9fc6f38c74366c17e02454e15975652a (diff)
downloademacs-8dcaeba2063164d2dfe11cfe0786fcb4c95d7105.tar.gz
emacs-8dcaeba2063164d2dfe11cfe0786fcb4c95d7105.zip
(Fw32_long_file_name): Don't append dir separator to bare drive.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/w32proc.c11
2 files changed, 16 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 81d1006f56f..2e75084d5bf 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12008-07-22 Jason Rumney <jasonr@gnu.org>
2
3 * w32proc.c (Fw32_long_file_name): Don't append dir separator to
4 bare drive.
5
12008-07-22 Adrian Robert <Adrian.B.Robert@gmail.com> 62008-07-22 Adrian Robert <Adrian.B.Robert@gmail.com>
2 7
3 * nsgui.h: 8 * nsgui.h:
@@ -11526,7 +11531,6 @@
11526 * w32fns.c (globals_of_w32fns): Init common controls. 11531 * w32fns.c (globals_of_w32fns): Init common controls.
11527 11532
115282007-10-08 Richard Stallman <rms@gnu.org> 115332007-10-08 Richard Stallman <rms@gnu.org>
11529
11530 * image.c (our_memory_buffer): Rename from omfib_buffer. 11534 * image.c (our_memory_buffer): Rename from omfib_buffer.
11531 11535
115322007-10-08 Richard Stallman <rms@gnu.org> 115362007-10-08 Richard Stallman <rms@gnu.org>
diff --git a/src/w32proc.c b/src/w32proc.c
index 33981445c7c..ed405cce9ff 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -1799,9 +1799,14 @@ All path elements in FILENAME are converted to their long names. */)
1799 Lisp_Object filename; 1799 Lisp_Object filename;
1800{ 1800{
1801 char longname[ MAX_PATH ]; 1801 char longname[ MAX_PATH ];
1802 int drive_only = 0;
1802 1803
1803 CHECK_STRING (filename); 1804 CHECK_STRING (filename);
1804 1805
1806 if (SBYTES (filename) == 2
1807 && *(SDATA (filename) + 1) == ':')
1808 drive_only = 1;
1809
1805 /* first expand it. */ 1810 /* first expand it. */
1806 filename = Fexpand_file_name (filename, Qnil); 1811 filename = Fexpand_file_name (filename, Qnil);
1807 1812
@@ -1810,6 +1815,12 @@ All path elements in FILENAME are converted to their long names. */)
1810 1815
1811 CORRECT_DIR_SEPS (longname); 1816 CORRECT_DIR_SEPS (longname);
1812 1817
1818 /* If we were passed only a drive, make sure that a slash is not appended
1819 for consistency with directories. Allow for drive mapping via SUBST
1820 in case expand-file-name is ever changed to expand those. */
1821 if (drive_only && longname[1] == ':' && longname[2] == '/' && !longname[3])
1822 longname[2] = '\0';
1823
1813 return build_string (longname); 1824 return build_string (longname);
1814} 1825}
1815 1826