Closed Foadsf closed 7 months ago
Thanks for the report, and the PR!
FWIW, I find it hard to understand the issue from your description alone. An MWE would be appreciated or, failing that, a clear example. I can't run anything on Windows! đŸ˜…
That said, given the feedback other users provided on #126, I reckon this is a real issue and your fix looks good to me. Thanks!
Description
As I have also explained here, I'm encountering an issue with the
ltx2any.rb
script, which creates excessively nested directories when running on Windows. This seems to occur during the execution of thecopy2tmp
method, which leads to a deeply nested directory structure like../folderName/folderName/folderName/...
, eventually causing a "No such file or directory" error.The command I run is
ruby "C:\Users\Foo\OneDrive - Bar\Desktop\Apps\ltx2any\ltx2any.rb" -t build main.tex
and the error message I get is
Steps to Reproduce
ltx2any.rb
script to process a LaTeX document.What I Tried
copy2tmp
method.copy2tmp
was called with appropriate parameters and reviewed its recursive calls.Expected Behavior
The script should copy files to a temporary directory without creating an unnecessary nested structure.
Actual Behavior
The script creates a deeply nested directory path, resulting in a file system error due to the path length or structure.
Environment
Additional Information
I am attaching the modified
ltx2any.rb
script for reference. Any insights or suggestions to resolve this issue would be greatly appreciated.Modified Script
Attachment: modified
ltx2any.rb
script