[latex3-commits] [git/LaTeX3-latex3-latex2e] lthooks2: Use internal (with lookup) file name parse for \CurrentFile (b6898635)

PhelypeOleinik tex.phelype at gmail.com
Wed Aug 19 01:06:16 CEST 2020


Repository : https://github.com/latex3/latex2e
On branch  : lthooks2
Link       : https://github.com/latex3/latex2e/commit/b6898635183334617ef077d5380e10e33611d7d3

>---------------------------------------------------------------

commit b6898635183334617ef077d5380e10e33611d7d3
Author: PhelypeOleinik <tex.phelype at gmail.com>
Date:   Tue Aug 18 20:06:16 2020 -0300

    Use internal (with lookup) file name parse for \CurrentFile
    
    And don't lose path separator when dropping extension


>---------------------------------------------------------------

b6898635183334617ef077d5380e10e33611d7d3
 base/ltfilehook.dtx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/base/ltfilehook.dtx b/base/ltfilehook.dtx
index 451d89ac..699ba180 100644
--- a/base/ltfilehook.dtx
+++ b/base/ltfilehook.dtx
@@ -474,8 +474,13 @@
 \cs_new_protected:Npn \@filehook at drop@extension #1
   {
     \tl_gset:Nx #1
-      { \exp_args:NV \@@_file_parse_full_name:nN #1 \use_i_ii:nnn }
+      {
+        \exp_args:NV \@@_file_parse_full_name:nN #1
+          \@@_drop_extension_aux:nnn
+      }
   }
+\cs_new:Npn \@@_drop_extension_aux:nnn #1 #2 #3
+  { \tl_if_empty:nF {#1} { #1 / } #2 }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -782,7 +787,7 @@
   { \exp_args:NV \@@_set_curr_file:nNN #1 }
 \cs_new_protected:Npn \@@_set_curr_file:nNN #1
   {
-    \file_parse_full_name_apply:nN {#1}
+    \@@_file_parse_full_name:nN {#1}
       \@@_set_curr_file_assign:nnnNN
   }
 \cs_new_protected:Npn \@@_set_curr_file_assign:nnnNN #1 #2 #3 #4 #5





More information about the latex3-commits mailing list.