Hi,
thank you for your work on ltx2any, it is really a handy tool for me to write Latex from vim! However, I encountered some unexpected behavior of the -t flag in combination with the -c flag.
I used it roughly like:
ltx2any -t /tmp -c FILE
I thought, the temporary files would be created there and afterwards only those just created files would be deleted. However, everything in /tmp was deleted (except root's files). I think I figured out it should be used like the following:
ltx2any -t /tmp/ltx2any_tmpdir -c FILE
The directory is created, the files are put there, and afterwards everything including the directory is removed -- which again is nice.
What do you think? Would it be better to clarify the behavior by making the description in parameters.rb more clear? Or is the behavior better changed? At least this can be pretty dangerous when doing
ltx2any -t ~ -c ~/dir/FILE.
I was thinking of something like:
Parameter.new(:tmpdir, 't', String, '"#{self[:user_jobname]}#{TMPSUFFIX}"', 'Directory for temporary files. If combined with -c, all contents of the directory including itself is removed afterwards.'),
An even safer approach might be to only accept non-existing directories as parameter (I'd prefer this).
Regards
Hi,
thank you for your work on ltx2any, it is really a handy tool for me to write Latex from vim! However, I encountered some unexpected behavior of the -t flag in combination with the -c flag.
I used it roughly like:
ltx2any -t /tmp -c FILEI thought, the temporary files would be created there and afterwards only those just created files would be deleted. However, everything in
/tmpwas deleted (exceptroot's files). I think I figured out it should be used like the following:ltx2any -t /tmp/ltx2any_tmpdir -c FILEThe directory is created, the files are put there, and afterwards everything including the directory is removed -- which again is nice.
What do you think? Would it be better to clarify the behavior by making the description in
parameters.rbmore clear? Or is the behavior better changed? At least this can be pretty dangerous when doingltx2any -t ~ -c ~/dir/FILE.I was thinking of something like:
Parameter.new(:tmpdir, 't', String, '"#{self[:user_jobname]}#{TMPSUFFIX}"', 'Directory for temporary files. If combined with -c, all contents of the directory including itself is removed afterwards.'),An even safer approach might be to only accept non-existing directories as parameter (I'd prefer this).
Regards