From b76a02d86bd8cb6d8b00989fc114186e118eb866 Mon Sep 17 00:00:00 2001 From: Brendan Hansknecht Date: Sat, 7 Oct 2023 00:50:29 -0700 Subject: [PATCH] Update kitty temp file naming (#51) Kitty does not consistently remove tmp files on all operating systems. Whenever it is unsure if the directory is a temporary directory, kitty will leave the image for security reasons. This will lead to eventually running out of tmp files and viuer no longer working. By changing the name to include `tty-graphics-protocol`, kitty will always delete the tmp file. --- src/printer/kitty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/printer/kitty.rs b/src/printer/kitty.rs index 7c4b603..1dc3447 100644 --- a/src/printer/kitty.rs +++ b/src/printer/kitty.rs @@ -8,7 +8,7 @@ use std::io::{Error, ErrorKind}; pub struct KittyPrinter; -const TEMP_FILE_PREFIX: &str = ".tmp.viuer."; +const TEMP_FILE_PREFIX: &str = ".tty-graphics-protocol.viuer."; lazy_static! { static ref KITTY_SUPPORT: KittySupport = check_kitty_support(); }