summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/file.c b/file.c
index 61a6525..d068b34 100644
--- a/file.c
+++ b/file.c
@@ -103,10 +103,20 @@ lookup_file (const char *name)
while (name[0] == '[' && name[1] == ']' && name[2] != '\0')
name += 2;
#endif
- while (name[0] == '.' && name[1] == '/' && name[2] != '\0')
+ while (name[0] == '.'
+#ifdef HAVE_DOS_PATHS
+ && (name[1] == '/' || name[1] == '\\')
+#else
+ && name[1] == '/'
+#endif
+ && name[2] != '\0')
{
name += 2;
- while (*name == '/')
+ while (*name == '/'
+#ifdef HAVE_DOS_PATHS
+ || *name == '\\'
+#endif
+ )
/* Skip following slashes: ".//foo" is "foo", not "/foo". */
++name;
}