ouch-org / ouch

Painless compression and decompression in the terminal
https://crates.io/crates/ouch
Other
2.22k stars 76 forks source link

Change .tmp file directory #685

Open valoq opened 3 months ago

valoq commented 3 months ago

When decompressing an archive, ouch will temporarily create a directory named .tmpXXXXXX (X = random char) It may be better to use a path in XDG_DATA_HOME or a more specific path name to make sure no file conflicts occur. A collision with a different application using the same path may be unlikely with 6 random characters, but this seems to be easy to avoid entirely.

marcospb19 commented 3 months ago

I think calling it something like .ouch-tmp-XXXXXX could be enough for collisions, and more informative for users too.

Although, I don't know of any application that names things like we currently do.

marcospb19 commented 3 months ago

Thanks for the suggestion! Will take a look for sure.