diff options
author | Eli Zaretskii <eliz@gnu.org> | 2009-12-11 12:02:45 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2009-12-11 12:02:45 +0000 |
commit | deace771d64683596218c63415e18ebef216fb34 (patch) | |
tree | d042cc23f7d880d378c850cb3917614467937df6 | |
parent | f4d9937274de3960f3af7356e1581163bafb93c3 (diff) | |
download | gunmake-deace771d64683596218c63415e18ebef216fb34.tar.gz |
(lookup_file) [HAVE_DOS_PATHS]: Treat '\\' like we do with '/'.
-rw-r--r-- | file.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -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; } |