From c7a53e654b2d72a3ee4626a4be2ab2f642a2efac Mon Sep 17 00:00:00 2001 From: andy brandt Date: Fri, 1 Dec 2017 00:55:52 -0600 Subject: [PATCH] use kpxc pipe name in windows --- src/proxy_socket.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/proxy_socket.rs b/src/proxy_socket.rs index e7899ab..50c2ed4 100644 --- a/src/proxy_socket.rs +++ b/src/proxy_socket.rs @@ -1,3 +1,4 @@ +use std::env; use std::io::{self, Read, Write}; #[cfg(not(windows))] @@ -28,13 +29,14 @@ impl Write for ProxySocket { #[cfg(windows)] pub fn connect() -> io::Result> { - let client = PipeClient::connect("\\\\.\\pipe\\KeePassHttp")?; + let temp_path = env::var("TEMP").unwrap(); + let pipe_name = format!("\\\\.\\pipe\\{}\\kpxc_server", temp_path); + let client = PipeClient::connect(pipe_name)?; Ok(ProxySocket { inner: client }) } #[cfg(not(windows))] pub fn connect() -> io::Result> { - use std::env; use std::time::Duration; let socket_name = "kpxc_server";