diff options
author | mahkoh <mahkoh@users.noreply.github.com> | 2022-02-16 22:15:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 21:15:50 +0000 |
commit | aaab88c5c5c94e11ffa3704407a3547cfabe4567 (patch) | |
tree | 81063b5244985c6ddcbcf7fae873af01e886727f /alacritty/src | |
parent | a64553bbaf9e058f02d278dfa7104ea96fc58dd8 (diff) | |
download | r-alacritty-aaab88c5c5c94e11ffa3704407a3547cfabe4567.tar.gz r-alacritty-aaab88c5c5c94e11ffa3704407a3547cfabe4567.tar.bz2 r-alacritty-aaab88c5c5c94e11ffa3704407a3547cfabe4567.zip |
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.
Diffstat (limited to 'alacritty/src')
-rw-r--r-- | alacritty/src/ipc.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<PathBuf>) -> IoResult<UnixStream> { #[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. |