summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 88e51bacec2..a7fe29e174b 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -753,7 +753,13 @@ See also the function `substitute-in-file-name'.")
The EQ test avoids infinite recursion. */
if (! NILP (defalt) && !EQ (defalt, name)
/* This saves time in a common case. */
+#ifdef MSDOS
+ && (XSTRING (defalt)->size < 3
+ || XSTRING (defalt)->data[1] != ':'
+ || XSTRING (defalt)->data[2] != '/'))
+#else
&& XSTRING (defalt)->data[0] != '/')
+#endif
{
struct gcpro gcpro1;