mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-26 15:21:51 -08:00
(Fw32_long_file_name): Don't append dir separator to bare drive.
This commit is contained in:
parent
df2142db9f
commit
8dcaeba206
2 changed files with 16 additions and 1 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2008-07-22 Jason Rumney <jasonr@gnu.org>
|
||||
|
||||
* w32proc.c (Fw32_long_file_name): Don't append dir separator to
|
||||
bare drive.
|
||||
|
||||
2008-07-22 Adrian Robert <Adrian.B.Robert@gmail.com>
|
||||
|
||||
* nsgui.h:
|
||||
|
|
@ -11526,7 +11531,6 @@
|
|||
* w32fns.c (globals_of_w32fns): Init common controls.
|
||||
|
||||
2007-10-08 Richard Stallman <rms@gnu.org>
|
||||
|
||||
* image.c (our_memory_buffer): Rename from omfib_buffer.
|
||||
|
||||
2007-10-08 Richard Stallman <rms@gnu.org>
|
||||
|
|
|
|||
|
|
@ -1799,9 +1799,14 @@ All path elements in FILENAME are converted to their long names. */)
|
|||
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 @@ All path elements in FILENAME are converted to their long names. */)
|
|||
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue