status-area: Fix how watcher handles some paths

This commit is contained in:
Ian Douglas Scott 2022-07-29 12:20:58 -07:00
parent 324b2daf65
commit ef6e865963

View file

@ -18,7 +18,11 @@ impl StatusNotifierWatcher {
#[zbus(header)] hdr: MessageHeader<'_>,
#[zbus(signal_context)] ctxt: SignalContext<'_>,
) {
let service = format!("{}{}", hdr.sender().unwrap().unwrap(), service);
let service = if service.starts_with('/') {
format!("{}{}", hdr.sender().unwrap().unwrap(), service)
} else {
service.to_string()
};
Self::StatusNotifierItemRegistered(&ctxt, &service)
.await
.unwrap();