diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-09-20 10:22:59 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-09-20 10:22:59 +0000 |
commit | 8365567142904bfd232514f56e3553eece790444 (patch) | |
tree | 5d2f38896b13d78c6134e1ccfc45126c58cdae73 /Build | |
parent | faa0cebb8ae3c94b13b51ff2136bc682f746028d (diff) |
kpathsea: fix to return actual file names (W32 only).
git-svn-id: svn://tug.org/texlive/trunk@45353 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/kpathsea/tex-file.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); } |