Mercurial > emacs
changeset 15109:b801c02f3e92
(Fexpand_file_name) [DOS_NT]: Keep dir sep following ~
or ~user, but don't collapse the newdir prefix in that case.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 29 Apr 1996 15:49:43 +0000 |
parents | 442458addd50 |
children | 5a9c77df2706 |
files | src/fileio.c |
diffstat | 1 files changed, 4 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c Mon Apr 29 15:46:17 1996 +0000 +++ b/src/fileio.c Mon Apr 29 15:49:43 1996 +0000 @@ -786,6 +786,7 @@ #endif /* VMS */ #ifdef DOS_NT int drive = 0; + int collapse_newdir = 1; #endif /* DOS_NT */ int length; Lisp_Object handler; @@ -1100,9 +1101,7 @@ newdir = (unsigned char *) ""; nm++; #ifdef DOS_NT - if (IS_DIRECTORY_SEP (nm[0])) - /* Make nm look like a relative file name. */ - nm++; + collapse_newdir = 0; #endif #ifdef VMS nm++; /* Don't leave the slash in nm. */ @@ -1128,9 +1127,7 @@ #else nm = p; #ifdef DOS_NT - if (IS_DIRECTORY_SEP (nm[0])) - /* Make nm look like a relative name. */ - nm++; + collapse_newdir = 0; #endif #endif /* VMS */ } @@ -1234,7 +1231,7 @@ /* Keep only a prefix from newdir if nm starts with slash (//server/share for UNC, nothing otherwise). */ - if (IS_DIRECTORY_SEP (nm[0])) + if (IS_DIRECTORY_SEP (nm[0]) && collapse_newdir) { #ifdef WINDOWSNT if (IS_DIRECTORY_SEP (newdir[0]) && IS_DIRECTORY_SEP (newdir[1]))