tectonic
tectonic copied to clipboard
--hide does not work with absolute paths/folders
Passing an absolute path to --hide does not stop tectonic from reading that file. If a relative path is used, this still works.
e.g. a.tex:
hello world
b.tex:
\documentclass{article}
\begin{document}
\input{a.tex}
\end{document}
tectonic b.tex --hide a.tex correctly fails with "File a.tex not found", but tectonic b.tex --hide "$PWD/a.tex" compiles when it shouldn't.
The cause of this is that FilesystemIo doesn't convert paths to absolute paths, and so might try to compare an absolute path with a relative one.
A related issue is that --hide doesn't work with folders, and requires you to specify each file individually.
Thanks for reporting this. I think the basic issue here is that the --hide mechanism operates on "TeX paths" as the TeX engine sees them, rather than filesystem paths of actual files. For relative paths one can fudge the difference, but here it matters.
It would be quite reasonable to try to improve things here. I don't think that I'm going to have the bandwidth to work on this personally but I'd welcome contributions in this area!