From 8365567142904bfd232514f56e3553eece790444 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Wed, 20 Sep 2017 10:22:59 +0000 Subject: kpathsea: fix to return actual file names (W32 only). git-svn-id: svn://tug.org/texlive/trunk@45353 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/kpathsea/tex-file.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Build/source') diff --git a/Build/source/texk/kpathsea/tex-file.c b/Build/source/texk/kpathsea/tex-file.c index 0a4e205f35b..ad52874218d 100644 --- a/Build/source/texk/kpathsea/tex-file.c +++ b/Build/source/texk/kpathsea/tex-file.c @@ -1013,6 +1013,7 @@ kpathsea_find_file_generic (kpathsea kpse, const_string const_name, { #if defined(_WIN32) && !defined(__MINGW32__) char tmpbuffer[512]; + char tmpbuffer2[512]; #endif string *target, name; const_string *ext; @@ -1140,12 +1141,14 @@ kpathsea_find_file_generic (kpathsea kpse, const_string const_name, if (ret && *ret) { if (all) { for (count = 0; ret[count] != NULL; count++) { - if (kpathsea_getlongpath (kpse, tmpbuffer, ret[count], 500) && + strcpy (tmpbuffer2, ret[count]); + if (kpathsea_getlongpath (kpse, tmpbuffer, tmpbuffer2, 500) && strlen (tmpbuffer) == strlen (ret[count])) strcpy (ret[count], tmpbuffer); } } else { - if (kpathsea_getlongpath (kpse, tmpbuffer, *ret, 500) && + strcpy (tmpbuffer2, *ret); + if (kpathsea_getlongpath (kpse, tmpbuffer, tmpbuffer2, 500) && strlen (tmpbuffer) == strlen (*ret)) strcpy (*ret, tmpbuffer); } -- cgit v1.2.3