LaTeXML icon indicating copy to clipboard operation
LaTeXML copied to clipboard

move (almost) all I/O under Util::Pathname

Open xworld21 opened this issue 5 months ago • 4 comments

This is an attempt at refactoring all I/O calls that deal with file/directory names through wrapper functions in Util::Pathname. This means all the -X tests, open, opendir, stat, and unlink. There might be others I did not catch.

My goal is to guarantee that normal LaTeXML code is never exposed to raw file names, which are not Unicode strings and must be decoded and encoded before use. The enconding and decoding will be done in the wrapper functions, although not yet – I first want to know if this refactor is ok.

(The encoding and decoding itself is simple, see #2545 for Unix using Encode::Locale. For Windows, I concluded that the only way to go is Win32::LongPath.)

xworld21 avatar Sep 20 '25 19:09 xworld21