Skip to content

Commit

Permalink
Update kitty temp file naming (#51)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bhansconnect authored Oct 7, 2023
1 parent dc81f44 commit b76a02d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/printer/kitty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit b76a02d

Please sign in to comment.