Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Use relative path for IPC sockets #1983

Merged
merged 2 commits into from
Aug 23, 2016
Merged

Use relative path for IPC sockets #1983

merged 2 commits into from
Aug 23, 2016

Conversation

NikVolf
Copy link
Contributor

@NikVolf NikVolf commented Aug 22, 2016

Probably also related #1978

@NikVolf NikVolf added the A0-pleasereview 🤓 Pull request needs code review. label Aug 22, 2016
@@ -167,10 +168,13 @@ impl IoHandler<ClientIoMessage> for ClientIoHandler {
}

#[cfg(feature="ipc")]
fn run_ipc(client: Arc<Client>, stop: Arc<AtomicBool>) {
fn run_ipc(base_path: &Path, client: Arc<Client>, stop: Arc<AtomicBool>) {
let mut path = ::std::path::PathBuf::from(base_path);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

base_path.to_owned()?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 86.916% when pulling 7c5435d on ipc-rel-dir into 880b7b8 on master.

pub fn hypervisor(base_path: &Path) -> Option<Hypervisor> {
Some(Hypervisor
::with_url(&service_urls::with_base(base_path.to_str().unwrap(), HYPERVISOR_IPC_URL))
.io_path(base_path.to_str().unwrap()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to_string_lossy() here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, it returns Cow

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

io_path takes an &str and Cow<str> implements Deref<Target=str> so it should work if you just slap a &* on the front

@rphmeier rphmeier added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Aug 23, 2016
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 86.92% when pulling 2d0a7c3 on ipc-rel-dir into 880b7b8 on master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants