mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-01-03 19:04:34 +00:00
(lookup_file) [HAVE_DOS_PATHS]: Treat '\\' like we do with '/'.
This commit is contained in:
parent
f4d9937274
commit
deace771d6
1 changed files with 12 additions and 2 deletions
14
file.c
14
file.c
|
@ -103,10 +103,20 @@ lookup_file (const char *name)
|
||||||
while (name[0] == '[' && name[1] == ']' && name[2] != '\0')
|
while (name[0] == '[' && name[1] == ']' && name[2] != '\0')
|
||||||
name += 2;
|
name += 2;
|
||||||
#endif
|
#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;
|
name += 2;
|
||||||
while (*name == '/')
|
while (*name == '/'
|
||||||
|
#ifdef HAVE_DOS_PATHS
|
||||||
|
|| *name == '\\'
|
||||||
|
#endif
|
||||||
|
)
|
||||||
/* Skip following slashes: ".//foo" is "foo", not "/foo". */
|
/* Skip following slashes: ".//foo" is "foo", not "/foo". */
|
||||||
++name;
|
++name;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue