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/lib/openclose.c | |
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/lib/openclose.c')
-rw-r--r-- | Build/source/texk/web2c/lib/openclose.c | 20 |
1 files changed, 19 insertions, 1 deletions
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_* */ |