aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-04-29 15:49:43 +0000
committerRichard M. Stallman1996-04-29 15:49:43 +0000
commit9a1dc3be437a1d9aa0fa9ebc7c7c0bf8be0031a5 (patch)
tree826a99f0f8b2988a3cf5547fcbfb030e3a0cac3e /src
parentde5c39cffd4216f21db580e89bb04ea412ecc66e (diff)
downloademacs-9a1dc3be437a1d9aa0fa9ebc7c7c0bf8be0031a5.tar.gz
emacs-9a1dc3be437a1d9aa0fa9ebc7c7c0bf8be0031a5.zip
(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'.")
786#endif /* VMS */ 786#endif /* VMS */
787#ifdef DOS_NT 787#ifdef DOS_NT
788 int drive = 0; 788 int drive = 0;
789 int collapse_newdir = 1;
789#endif /* DOS_NT */ 790#endif /* DOS_NT */
790 int length; 791 int length;
791 Lisp_Object handler; 792 Lisp_Object handler;
@@ -1100,9 +1101,7 @@ See also the function `substitute-in-file-name'.")
1100 newdir = (unsigned char *) ""; 1101 newdir = (unsigned char *) "";
1101 nm++; 1102 nm++;
1102#ifdef DOS_NT 1103#ifdef DOS_NT
1103 if (IS_DIRECTORY_SEP (nm[0])) 1104 collapse_newdir = 0;
1104 /* Make nm look like a relative file name. */
1105 nm++;
1106#endif 1105#endif
1107#ifdef VMS 1106#ifdef VMS
1108 nm++; /* Don't leave the slash in nm. */ 1107 nm++; /* Don't leave the slash in nm. */
@@ -1128,9 +1127,7 @@ See also the function `substitute-in-file-name'.")
1128#else 1127#else
1129 nm = p; 1128 nm = p;
1130#ifdef DOS_NT 1129#ifdef DOS_NT
1131 if (IS_DIRECTORY_SEP (nm[0])) 1130 collapse_newdir = 0;
1132 /* Make nm look like a relative name. */
1133 nm++;
1134#endif 1131#endif
1135#endif /* VMS */ 1132#endif /* VMS */
1136 } 1133 }
@@ -1234,7 +1231,7 @@ See also the function `substitute-in-file-name'.")
1234 1231
1235 /* Keep only a prefix from newdir if nm starts with slash 1232 /* Keep only a prefix from newdir if nm starts with slash
1236 (//server/share for UNC, nothing otherwise). */ 1233 (//server/share for UNC, nothing otherwise). */
1237 if (IS_DIRECTORY_SEP (nm[0])) 1234 if (IS_DIRECTORY_SEP (nm[0]) && collapse_newdir)
1238 { 1235 {
1239#ifdef WINDOWSNT 1236#ifdef WINDOWSNT
1240 if (IS_DIRECTORY_SEP (newdir[0]) && IS_DIRECTORY_SEP (newdir[1])) 1237 if (IS_DIRECTORY_SEP (newdir[0]) && IS_DIRECTORY_SEP (newdir[1]))