diff options
author | Karl Berry <karl@freefriends.org> | 2011-05-02 00:51:18 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-05-02 00:51:18 +0000 |
commit | b8bbdf4a90cac129c1e64646f77352713c431a1d (patch) | |
tree | d6365cb8a8ae4b6dd38d147afc3e922c09e53761 /Build/source/texk/web2c | |
parent | 70f591817b5748d4d9874c24aa51918ce84f975d (diff) |
take -output-directory into account in the final recorder filename
git-svn-id: svn://tug.org/texlive/trunk@22270 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c')
-rw-r--r-- | Build/source/texk/web2c/lib/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/lib/openclose.c | 20 |
2 files changed, 27 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/lib/ChangeLog b/Build/source/texk/web2c/lib/ChangeLog index 1ab021ec298..20e6f7a0007 100644 --- a/Build/source/texk/web2c/lib/ChangeLog +++ b/Build/source/texk/web2c/lib/ChangeLog @@ -1,6 +1,13 @@ +2011-05-02 Karl Berry <karl@tug.org> + + * openclose.c (recorder_change_filename): take output_directory + into account. Report/patch from + Philipp Stephani, 30 Apr 2011 16:11:53, + http://tracker.luatex.org/view.php?id=615 + 2011-04-28 Karl Berry <karl@tug.org> - * printversion.c (printversionandexit): 2011 + * printversion.c (printversionandexit): it is 2011. 2011-04-27 Karl Berry <karl@tug.org> diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c index dc2393a8746..1e46a2224bc 100644 --- a/Build/source/texk/web2c/lib/openclose.c +++ b/Build/source/texk/web2c/lib/openclose.c @@ -67,15 +67,33 @@ recorder_start(void) free(cwd); } -/* Change the name of the recorder file. */ +/* Change the name of the recorder file after we know the log file to + the usual thing -- no pid integer and the document file name instead + of the program name. Unfortunately, we have to explicitly take + -output-directory into account (again), since the NEW_NAME we are + called with does not; it is just the log file name with .log replaced + by .fls. */ + void recorder_change_filename (string new_name) { + string temp = NULL; + if (!recorder_file) return; + + /* If an output directory was specified, use it. */ + if (output_directory) { + temp = concat3(output_directory, DIR_SEP_STRING, new_name); + new_name = temp; + } + rename(recorder_name, new_name); free(recorder_name); recorder_name = xstrdup(new_name); + + if (temp) + free (temp); } /* helper for recorder_record_* */ |