From beaf2e85dab6b1b3f940758aa11378df14877da9 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 28 Jun 2018 17:42:07 +0000 Subject: do not prepend top-level dir if searched-for filename is absolute git-svn-id: svn://tug.org/texlive/trunk@48107 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/lib/ChangeLog | 7 +++++++ Build/source/texk/web2c/lib/openclose.c | 14 ++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'Build/source/texk/web2c/lib') diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index 4a88e860839..e787c982cb4 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,3 +1,10 @@ +2018-06-28 Karl Berry + + * openclose.c (open_input_with_dirname): do not prepend the + top-level directory name if the subsidiary aux file being searched + for is alrady absolute. Private report from John Collins + (22 Jun 2018 14:01:31). + 2018-06-14 Akira Kakuto * texmfmp.c: remove sjisterminal (w32 only). diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c index 2add7f05bc3..44dcf4517db 100644 --- a/Build/source/texk/web2c/lib/openclose.c +++ b/Build/source/texk/web2c/lib/openclose.c @@ -300,11 +300,12 @@ open_input (FILE **f_ptr, int filefmt, const_string fopen_mode) /* Open input file *F_PTR (of type FILEFMT), prepending the directory - part of the string FNAME. This is called from BibTeX, to open - subsidiary .aux files, with FNAME set to the top-level aux file. The - idea is that if invoked as bibtex somedir/foo.aux, and foo.aux has an - \@input{bar} statement, we should look for somedir/bar.aux too. - (See bibtex-auxinclude.test.) */ + part of the string FNAME to `nameoffile'+1, unless that is already + kpse_absolute_p. This is called from BibTeX, to open subsidiary .aux + files, with FNAME set to the top-level aux file. The idea is that if + we're invoked as bibtex somedir/foo.aux, and foo.aux has an + \@input{bar} statement, we should look for somedir/bar.aux too. (See + bibtex-auxinclude.test.) */ boolean open_input_with_dirname (FILE **f_ptr, int filefmt, const char *fname) @@ -312,7 +313,8 @@ open_input_with_dirname (FILE **f_ptr, int filefmt, const char *fname) boolean ret = false; char *top_dir = xdirname (fname); - if (top_dir && *top_dir && !STREQ (top_dir, ".")) { + if (top_dir && *top_dir && !STREQ (top_dir, ".") + && !kpse_absolute_p (nameoffile+1, true)) { char *newname = concat3 (top_dir, DIR_SEP_STRING, nameoffile+1); free (nameoffile); nameoffile = xmalloc (strlen (newname) + 2); -- cgit v1.2.3