summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2022-03-08 05:12:25 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2022-03-08 05:12:25 +0000
commitac3e6c9162fcf0dd4651c2bbccae860934485300 (patch)
tree46e6348a5c258b98bf450414094111e1ad1093d0 /Build
parent71bd222c9709b0484a11948996dbf6bf4473cc6c (diff)
fix a bug in recorder (w32 only)
git-svn-id: svn://tug.org/texlive/trunk@62512 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/lib/openclose.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/lib/openclose.c b/Build/source/texk/web2c/lib/openclose.c
index 20c3a47de73..1dda1941f4f 100644
--- a/Build/source/texk/web2c/lib/openclose.c
+++ b/Build/source/texk/web2c/lib/openclose.c
@@ -114,6 +114,19 @@ recorder_start(void)
recorder_file = xfopen(recorder_name, FOPEN_W_MODE);
cwd = xgetcwd();
+#if defined(_WIN32)
+ {
+ wchar_t *wpwd;
+ if (file_system_codepage != 0 &&
+ file_system_codepage != win32_codepage) {
+ wpwd = get_wstring_from_mbstring(win32_codepage, cwd, wpwd=NULL);
+ free (cwd);
+ cwd = get_mbstring_from_wstring(file_system_codepage, wpwd, cwd=NULL);
+ free (wpwd);
+ }
+ }
+#endif /* _WIN32 */
+
fprintf(recorder_file, "PWD %s\n", cwd);
free(cwd);
}