summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-04-29 15:49:43 +0000
committerRichard M. Stallman <rms@gnu.org>1996-04-29 15:49:43 +0000
commitfc345188a8846a6f95af4f03392c7b0a0498b879 (patch)
tree7a6ad09f6652070fc2e82ebe2ea81183b974bb22 /src
parent29e66fae16aa18bd088f0b7d4f026515b3e952e3 (diff)
downloademacs-fc345188a8846a6f95af4f03392c7b0a0498b879.tar.gz
(Fexpand_file_name) [DOS_NT]: Keep dir sep following ~
or ~user, but don't collapse the newdir prefix in that case.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/fileio.c b/src/fileio.c
index d01b70c7af7..1065a5aa113 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -786,6 +786,7 @@ See also the function `substitute-in-file-name'.")
#endif /* VMS */
#ifdef DOS_NT
int drive = 0;
+ int collapse_newdir = 1;
#endif /* DOS_NT */
int length;
Lisp_Object handler;
@@ -1100,9 +1101,7 @@ See also the function `substitute-in-file-name'.")
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 @@ See also the function `substitute-in-file-name'.")
#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 @@ See also the function `substitute-in-file-name'.")
/* 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]))