From aaab88c5c5c94e11ffa3704407a3547cfabe4567 Mon Sep 17 00:00:00 2001 From: mahkoh Date: Wed, 16 Feb 2022 22:15:50 +0100 Subject: Account for absolute WAYLAND_DISPLAY paths If WAYLAND_DISPLAY contains a '/', we have to replace with with another character before using WAYLAND_DISPLAY as a path component. --- alacritty/src/ipc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'alacritty/src') diff --git a/alacritty/src/ipc.rs b/alacritty/src/ipc.rs index a71b5139..d4c807ba 100644 --- a/alacritty/src/ipc.rs +++ b/alacritty/src/ipc.rs @@ -152,7 +152,7 @@ fn find_socket(socket_path: Option) -> IoResult { #[cfg(not(target_os = "macos"))] fn socket_prefix() -> String { let display = env::var("WAYLAND_DISPLAY").or_else(|_| env::var("DISPLAY")).unwrap_or_default(); - format!("Alacritty-{}", display) + format!("Alacritty-{}", display.replace('/', "-")) } /// File prefix matching all available sockets. -- cgit