summaryrefslogtreecommitdiff
path: root/Build/source/texk/mendexk/pageread.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/mendexk/pageread.c')
-rw-r--r--Build/source/texk/mendexk/pageread.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Build/source/texk/mendexk/pageread.c b/Build/source/texk/mendexk/pageread.c
index 41c65de14c1..8b16e892d7a 100644
--- a/Build/source/texk/mendexk/pageread.c
+++ b/Build/source/texk/mendexk/pageread.c
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <string.h>
+#include <kpathsea/tex-file.h>
#include "mendex.h"
/* checking last page */
@@ -20,7 +21,10 @@ int lastpage(const char *filename)
}
if (i==-1) sprintf(logfile,"%s.log",filename);
- fp=fopen(logfile,"r");
+ if(kpse_in_name_ok(logfile))
+ fp=fopen(logfile,"r");
+ else
+ fp=NULL;
if (fp==NULL) {
fprintf(stderr,"No log file, %s.\n",logfile);
exit(0);