mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-08-22 18:31:02 +00:00
Use Utf8Path::with_added_extension for constructing the temporary socket path
Co-Authored-By: Erik Johnston <erikj@element.io>
This commit is contained in:
co-authored by
Erik Johnston
parent
cd78f82f9c
commit
fc94b550db
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user