Use Utf8Path::with_added_extension for constructing the temporary socket path

Co-Authored-By: Erik Johnston <erikj@element.io>
This commit is contained in:
Quentin Gliech
2026-07-28 13:21:34 +02:00
co-authored by Erik Johnston
parent cd78f82f9c
commit fc94b550db
+1 -1
View File
@@ -488,7 +488,7 @@ pub fn build_listeners(
// doesn't work) and change the permissions of the socket before it being
// available.
let pid = std::process::id();
let tmp_socket = Utf8PathBuf::from(format!("{socket}.{pid}.tmp"));
let tmp_socket = socket.with_added_extension(format!("{pid}.tmp"));
// Delete the temporary socket on drop, to avoid leaving it around if we fail.
let guard = RemoveOnDrop::new(&tmp_socket);