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 | |
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.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | alacritty/src/ipc.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 60bb7301..f1a1bd27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Buili-in font arcs alignment - Repeated permission prompts on M1 macs - Colors being slightly off when using `colors.transparent_background_colors` +- Creating the IPC socket failing if WAYLAND_DISPLAY contains an absolute path ## 0.10.0 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. |