summaryrefslogtreecommitdiff
path: root/macros/latex/base/ltfiles.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/base/ltfiles.dtx')
-rw-r--r--macros/latex/base/ltfiles.dtx23
1 files changed, 14 insertions, 9 deletions
diff --git a/macros/latex/base/ltfiles.dtx b/macros/latex/base/ltfiles.dtx
index a2037e221f..d0d33a4c71 100644
--- a/macros/latex/base/ltfiles.dtx
+++ b/macros/latex/base/ltfiles.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfiles.dtx}
- [2019/10/11 v1.2c LaTeX Kernel (File Handling)]
+ [2019/10/26 v1.2d LaTeX Kernel (File Handling)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfiles.dtx}
@@ -714,6 +714,7 @@
%
% \changes{v1.2a}{2019/07/01}{Support UTF-8}
% \changes{v1.2c}{2019/10/11}{Remove one brace group}
+% \changes{v1.2d}{2019/10/26}{remove quotes}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
@@ -722,7 +723,9 @@
\def\set@curr@file#1{%
\begingroup
\escapechar\m@ne
- \xdef\@curr@file{\expandafter\string\csname\@firstofone#1\@empty\endcsname}%
+ \xdef\@curr@file{%
+ \expandafter\string
+ \csname\expandafter\unquote@name\expandafter{\@firstofone#1\@empty}\endcsname}%
\endgroup
}
% \end{macrocode}
@@ -758,11 +761,11 @@
%
% \changes{v1.2a}{2019/07/01}{Support UTF-8}
% \changes{v1.2b}{2019/08/27}{Make command robust}
+% \changes{v1.2d}{2019/10/26}{dont quote name}
% \begin{macrocode}
\DeclareRobustCommand\IfFileExists[1]{%
\set@curr@file{#1}%
- \edef\q@curr@file{\expandafter\quote@name\expandafter{\@curr@file}}%
- \expandafter\IfFileExists@\expandafter{\q@curr@file}}
+ \expandafter\IfFileExists@\expandafter{\@curr@file}}
% \end{macrocode}
% \end{macro}
%
@@ -770,10 +773,11 @@
% \changes{v0.9b}{1993/12/04}{Macro added}
% \changes{v0.9p}{1994/01/18}{New Definition}
% \changes{v1.0t}{1995/05/25}{(CAR) added \cs{long}}
-%
+% \changes{v1.2d}{2019/10/26}{quote on openin}%
+% Argument |#1| is |\@curr@file| so catcode 12 string with no quotes.
% \begin{macrocode}
\long\def \IfFileExists@#1#2#3{%
- \openin\@inputcheck#1 %
+ \openin\@inputcheck"#1" %
\ifeof\@inputcheck
\ifx\input@path\@undefined
\def\reserved@a{#3}%
@@ -782,7 +786,7 @@
\fi
\else
\closein\@inputcheck
- \edef\@filef@und{#1 }%
+ \edef\@filef@und{"#1" }%
\def\reserved@a{#2}%
\fi
\reserved@a}
@@ -834,14 +838,15 @@
% {(CAR) added \cs{long}}
% \changes{v1.1d}{1996/01/10}
% {Change argument handling to not require doubled hash. latex/2024}
+% \changes{v1.2d}{2019/10/26}{quote on openin}%
% \begin{macrocode}
\long\def\@iffileonpath#1{%
\let\reserved@a\@secondoftwo
\expandafter\@tfor\expandafter\reserved@b\expandafter
:\expandafter=\input@path\do{%
- \openin\@inputcheck\reserved@b#1 %
+ \openin\@inputcheck\expandafter\quote@name\expandafter{\reserved@b#1} %
\ifeof\@inputcheck\else
- \edef\@filef@und{\reserved@b#1 }%
+ \edef\@filef@und{"\reserved@b#1" }%
\let\reserved@a\@firstoftwo%
\closein\@inputcheck
\@break@tfor