summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/web2c/lib/ChangeLog4
-rw-r--r--Build/source/texk/web2c/lib/texmfmp.c9
2 files changed, 8 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog
index 7516c488f70..8fb448ca7c2 100644
--- a/Build/source/texk/web2c/lib/ChangeLog
+++ b/Build/source/texk/web2c/lib/ChangeLog
@@ -1,3 +1,7 @@
+2022-04-25 Karl Berry <karl@freefriends.org>
+
+ * texmfmp.c (find_input_file): doc fix.
+
2022-03-21 Karl Berry <karl@tug.org>
* TL'22 release.
diff --git a/Build/source/texk/web2c/lib/texmfmp.c b/Build/source/texk/web2c/lib/texmfmp.c
index 6dc2b22119a..52f3028aeb2 100644
--- a/Build/source/texk/web2c/lib/texmfmp.c
+++ b/Build/source/texk/web2c/lib/texmfmp.c
@@ -3414,12 +3414,11 @@ find_input_file(integer s)
#endif
/* Look in -output-directory first, if the filename is not
absolute. This is because we want the pdf* functions to
- be able to find the same files as \openin */
+ be able to find the same files as \openin. */
if (output_directory && !kpse_absolute_p (filename, false)) {
- string pathname;
-
- pathname = concat3(output_directory, DIR_SEP_STRING, filename);
- if (!access(pathname, R_OK) && !dir_p (pathname)) {
+ string pathname = concat3(output_directory, DIR_SEP_STRING, filename);
+ /* If there happens to be a directory by that name, never mind. */
+ if (access(pathname, R_OK) == 0 && !dir_p (pathname)) {
#if IS_pTeX && !defined(WIN32)
if (fname1) free(filename);
#endif