[latex3-commits] [git/LaTeX3-latex3-latex3] master: Defensive approch to LuaTeX + extensionless file names (6f0a44e73)
Joseph Wright
joseph.wright at morningstar2.co.uk
Thu Oct 10 14:39:22 CEST 2019
Repository : https://github.com/latex3/latex3
On branch : master
Link : https://github.com/latex3/latex3/commit/6f0a44e735e66643503c020b7716d8e0ccd583d9
>---------------------------------------------------------------
commit 6f0a44e735e66643503c020b7716d8e0ccd583d9
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Thu Oct 10 13:39:22 2019 +0100
Defensive approch to LuaTeX + extensionless file names
This is the only place we need raw \openin.
>---------------------------------------------------------------
6f0a44e735e66643503c020b7716d8e0ccd583d9
l3kernel/l3file.dtx | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/l3kernel/l3file.dtx b/l3kernel/l3file.dtx
index 72fec7dca..81e8c2ce6 100644
--- a/l3kernel/l3file.dtx
+++ b/l3kernel/l3file.dtx
@@ -1043,11 +1043,18 @@
%</package>
}
\cs_generate_variant:Nn \__kernel_ior_open:Nn { No }
-\cs_new_protected:Npn \@@_open_stream:Nn #1#2
+% \end{macrocode}
+% Here, we act defensively in case \LuaTeX{} is in use with an
+% extensionless file name.
+% \begin{macrocode}
+\cs_new_protected:Npx \@@_open_stream:Nn #1#2
{
- \tex_global:D \tex_chardef:D #1 = \l_@@_stream_tl \scan_stop:
- \prop_gput:NVn \g_@@_streams_prop #1 {#2}
- \tex_openin:D #1 #2 \scan_stop:
+ \tex_global:D \tex_chardef:D #1 = \exp_not:N \l_@@_stream_tl \scan_stop:
+ \prop_gput:NVn \exp_not:N \g_@@_streams_prop #1 {#2}
+ \tex_openin:D #1
+ \sys_if_engine_luatex:TF
+ { {#2} }
+ { #2 \scan_stop: }
}
% \end{macrocode}
% \end{macro}
More information about the latex3-commits
mailing list