texlive[45352] Build/source/texk/kpathsea: kpathsea: Fix to return
commits+kakuto at tug.org
commits+kakuto at tug.org
Wed Sep 20 08:58:43 CEST 2017
Revision: 45352
http://tug.org/svn/texlive?view=revision&revision=45352
Author: kakuto
Date: 2017-09-20 08:58:43 +0200 (Wed, 20 Sep 2017)
Log Message:
-----------
kpathsea: Fix to return actual file names (W32 only)
Modified Paths:
--------------
trunk/Build/source/texk/kpathsea/ChangeLog
trunk/Build/source/texk/kpathsea/tex-file.c
Modified: trunk/Build/source/texk/kpathsea/ChangeLog
===================================================================
--- trunk/Build/source/texk/kpathsea/ChangeLog 2017-09-20 00:21:17 UTC (rev 45351)
+++ trunk/Build/source/texk/kpathsea/ChangeLog 2017-09-20 06:58:43 UTC (rev 45352)
@@ -1,3 +1,7 @@
+2017-09-20 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
+
+ * tex-file.c: Fix to return actual file names (W32 only).
+
2017-09-19 Akira Kakuto <kakuto at fuk.kindai.ac.jp>
* db.c: Fix for DOSISH systems in which _WIN32 is not defined.
Modified: trunk/Build/source/texk/kpathsea/tex-file.c
===================================================================
--- trunk/Build/source/texk/kpathsea/tex-file.c 2017-09-20 00:21:17 UTC (rev 45351)
+++ trunk/Build/source/texk/kpathsea/tex-file.c 2017-09-20 06:58:43 UTC (rev 45352)
@@ -1011,6 +1011,9 @@
kpse_file_format_type format,
boolean must_exist, boolean all)
{
+#if defined(_WIN32) && !defined(__MINGW32__)
+ char tmpbuffer[512];
+#endif
string *target, name;
const_string *ext;
unsigned count;
@@ -1133,7 +1136,21 @@
}
free (name);
-
+#if defined(_WIN32) && !defined(__MINGW32__)
+ if (ret && *ret) {
+ if (all) {
+ for (count = 0; ret[count] != NULL; count++) {
+ if (kpathsea_getlongpath (kpse, tmpbuffer, ret[count], 500) &&
+ strlen (tmpbuffer) == strlen (ret[count]))
+ strcpy (ret[count], tmpbuffer);
+ }
+ } else {
+ if (kpathsea_getlongpath (kpse, tmpbuffer, *ret, 500) &&
+ strlen (tmpbuffer) == strlen (*ret))
+ strcpy (*ret, tmpbuffer);
+ }
+ }
+#endif
return ret;
}
More information about the tex-live-commits
mailing list