From 8cfc2bd1ad9646fcccff6be533d52cc0876e66ca Mon Sep 17 00:00:00 2001 From: Jorge Morante Date: Fri, 12 Jan 2024 09:44:12 +0100 Subject: [PATCH] change log path to /tmp/fingers.log and remove /tmp hardcoded path --- src/fingers/dirs.cr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fingers/dirs.cr b/src/fingers/dirs.cr index fe6d84a..70d7b0d 100644 --- a/src/fingers/dirs.cr +++ b/src/fingers/dirs.cr @@ -5,10 +5,11 @@ require "file_utils" module Fingers::Dirs TMUX_PID = (ENV["TMUX"] || ",0000").split(",")[1] - ROOT = Path["/tmp"] / "tmux-#{TMUX_PID}" + TMP = Path[File.dirname(File.tempname)] + ROOT = TMP / "tmux-#{TMUX_PID}" LOG_PATH = ROOT / "fingers.log" - CACHE = ROOT / "tmux-fingers" + CACHE = TMP / "tmux-fingers" CONFIG_PATH = CACHE / "config.json" SOCKET_PATH = CACHE / "fingers.sock"