Don't create IPC dir on windows

This commit is contained in:
arkpar 2017-10-29 13:35:12 +01:00
parent 44511f9254
commit 4b56f2530d
No known key found for this signature in database
GPG Key ID: CF9ADE6B115EB4DD
1 changed files with 5 additions and 3 deletions

View File

@ -304,9 +304,11 @@ pub fn new_ipc<D: rpc_apis::Dependencies>(
let handler = setup_apis(conf.apis, dependencies);
let remote = dependencies.remote.clone();
let path = PathBuf::from(&conf.socket_addr);
if let Some(dir) = path.parent() {
::std::fs::create_dir_all(&dir)
.map_err(|err| format!("Unable to create IPC directory at {}: {}", dir.display(), err))?;
if !cfg!(windows) {
if let Some(dir) = path.parent() {
::std::fs::create_dir_all(&dir)
.map_err(|err| format!("Unable to create IPC directory at {}: {}", dir.display(), err))?;
}
}
match rpc::start_ipc(&conf.socket_addr, handler, remote, rpc::RpcExtractor) {