diff options
Diffstat (limited to 'Build/source/texk/kpathsea/readable.c')
-rw-r--r-- | Build/source/texk/kpathsea/readable.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Build/source/texk/kpathsea/readable.c b/Build/source/texk/kpathsea/readable.c index dc83f36bd28..182a5e69a16 100644 --- a/Build/source/texk/kpathsea/readable.c +++ b/Build/source/texk/kpathsea/readable.c @@ -51,11 +51,24 @@ READABLE(kpathsea kpse, const_string fn, unsigned int st) Windows, if it really exists and input name is given in full-absolute path in a command line. /../, /./, \..\, \.\ should be excluded (2020/06/06) + More than one directory separators should be excluded. (2020/10/24) */ p = strstr(fn, ".\\"); if (!p) { p = strstr(fn, "./"); } + if (!p && len > 2) { + p = strstr(fn + 2, "//"); + } + if (!p && len > 2) { + p = strstr(fn + 2, "\\\\"); + } + if (!p && len > 2) { + p = strstr(fn + 2, "\\/"); + } + if (!p && len > 2) { + p = strstr(fn + 2, "/\\"); + } if (!p && len > 2 && ((fn[0] == '/' && fn[1] == '/') || (fn[0] == '\\' && fn[1] == '\\' && fn[2] != '?'))) { fn += 2; |