atanunq / viuer

Rust library for displaying images in the terminal.
MIT License
253 stars 46 forks source link

Update kitty temp file naming #51

Closed bhansconnect closed 1 year ago

bhansconnect commented 1 year ago

Kitty will now only remove temp files if they contain tty-graphics-protocol in the path. With viuer's current naming scheme, this will lead to eventually running out of tmp files and viuer hanging. By changing the name to include tty-graphics-protocol, kitty will always delete the tmp file.

bhansconnect commented 1 year ago

Assuming this patch gets accepted, can we cut another release of viuer?

bhansconnect commented 1 year ago

Just to clarify, I dug into this a bit more, and it is not a kitty bug. For kitty 0.26.0 and newer, kitty will only ever delete files with tty-graphics-protocol in the name. This is to avoid accidentally deleting files in the tmp dir.

Logged here: https://sw.kovidgoyal.net/kitty/changelog/#id14

Graphics protocol: Only delete temp files if they have the string tty-graphics-protocol in their file paths. This prevents deletion of arbitrary files in /tmp.

atanunq commented 1 year ago

Thank you! Released 0.7.0 with this fix