aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index f979cb2ab48..062f75ede81 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -348,6 +348,12 @@ on VMS, perhaps instead a string ending in `:', `]' or `>'.")
348 348
349 if (p == beg) 349 if (p == beg)
350 return Qnil; 350 return Qnil;
351#ifdef WINDOWSNT
352 /* We can consider the partial UNC name //machine to be a
353 directory name, but not just // on its own. */
354 if (p == beg + 1 && IS_DIRECTORY_SEP (p[-1]))
355 return Qnil;
356#endif
351#ifdef DOS_NT 357#ifdef DOS_NT
352 /* Expansion of "c:" to drive and default directory. */ 358 /* Expansion of "c:" to drive and default directory. */
353 if (p == beg + 2 && beg[1] == ':') 359 if (p == beg + 2 && beg[1] == ':')
@@ -1252,9 +1258,14 @@ See also the function `substitute-in-file-name'.")
1252 1258
1253 if (newdir) 1259 if (newdir)
1254 { 1260 {
1255 /* Get rid of any slash at the end of newdir. */ 1261 /* Get rid of any slash at the end of newdir, unless newdir is
1262 just // (an incomplete UNC name). */
1256 length = strlen (newdir); 1263 length = strlen (newdir);
1257 if (IS_DIRECTORY_SEP (newdir[length - 1])) 1264 if (IS_DIRECTORY_SEP (newdir[length - 1])
1265#ifdef WINDOWSNT
1266 && !(length == 2 && IS_DIRECTORY_SEP (newdir[0]))
1267#endif
1268 )
1258 { 1269 {
1259 unsigned char *temp = (unsigned char *) alloca (length); 1270 unsigned char *temp = (unsigned char *) alloca (length);
1260 bcopy (newdir, temp, length - 1); 1271 bcopy (newdir, temp, length - 1);