diff options
author | Karl Berry <karl@freefriends.org> | 2018-06-28 17:42:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-06-28 17:42:07 +0000 |
commit | beaf2e85dab6b1b3f940758aa11378df14877da9 (patch) | |
tree | a5bc19444b9419c1efb9f8deb7e3e1527faf597e /Build/source/texk/web2c/lib/openclose.c | |
parent | 41871c95a8c749f99d05a58e6ea4db314325602f (diff) |
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
Diffstat (limited to 'Build/source/texk/web2c/lib/openclose.c')
-rw-r--r-- | Build/source/texk/web2c/lib/openclose.c | 14 |
1 files changed, 8 insertions, 6 deletions
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); |