Closed rudenkornk closed 1 month ago
Thanks for the patch! Actually I have no idea how tmux behaves in a multiuser scenario, all the files there (except for the LOG one that you are fixing) are shared within a tmux server instance. Not sure if two different linux users can attach to the same tmux session or not 🤔.
If it's not possible then it's possible to just prefix with ROOT, which is unique per tmux server instance. Otherwise all other paths need to be scoped by user id.
Nah, I am not trying for multiple users to attach to the same session, they use their own unique tmux sessions. The problem is not even in tmux. The problem is that the extension itself synchronizes on the same global files on the entire system: /tmp/fingers.log
and /tmp/action-stderr
. Two different users will try to use exactly same files with exactly same absolute paths and one of them will fail to do so, since ony the first user created the files will have correct access.
I have simplified the patch, replaced USER_ID
with tmux PID
via the ROOT
dir. Also removed TMP
since it is unsafe to use it directly because of the problem above.
@Morantron ping 😳👉👈
Merging for the action-stderr fixes, I'm gonna use XDG folders which I think is the correct way to handle this (https://github.com/Morantron/tmux-fingers/tree/xdg-dirs)
I am a total newbie in Crystal, but I did my best ¯\_(ツ)_/¯
126