From 4d8699ec3dd95ac74a91a48b829927d08b0fcf54 Mon Sep 17 00:00:00 2001 From: Isaiah Inuwa Date: Fri, 23 Jan 2026 15:32:16 -0600 Subject: [PATCH] daemon: Use string instead of PathBuf for app path --- credentialsd-common/src/model.rs | 4 ++-- credentialsd-ui/src/gui/view_model/mod.rs | 2 +- credentialsd/src/dbus/gateway.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/credentialsd-common/src/model.rs b/credentialsd-common/src/model.rs index a2352dd..b401cfd 100644 --- a/credentialsd-common/src/model.rs +++ b/credentialsd-common/src/model.rs @@ -1,4 +1,4 @@ -use std::{fmt::Display, path::PathBuf}; +use std::fmt::Display; use serde::{Deserialize, Serialize}; use zvariant::{SerializeDict, Type}; @@ -99,7 +99,7 @@ impl Transport { #[derive(Debug, Default, Clone, Serialize, Deserialize, Type)] pub struct RequestingApplication { pub name: String, - pub path: PathBuf, + pub path: String, pub pid: u32, } diff --git a/credentialsd-ui/src/gui/view_model/mod.rs b/credentialsd-ui/src/gui/view_model/mod.rs index bb2d812..c374772 100644 --- a/credentialsd-ui/src/gui/view_model/mod.rs +++ b/credentialsd-ui/src/gui/view_model/mod.rs @@ -107,7 +107,7 @@ impl ViewModel { subtitle = subtitle.replace("%s1", &self.rp_id); subtitle = subtitle.replace("%i1", &format!("{}", requesting_app.pid)); subtitle = subtitle.replace("%s2", &requesting_app.name); - subtitle = subtitle.replace("%s3", &requesting_app.path.to_string_lossy()); + subtitle = subtitle.replace("%s3", &requesting_app.path); self.title = title; self.subtitle = subtitle; self.tx_update diff --git a/credentialsd/src/dbus/gateway.rs b/credentialsd/src/dbus/gateway.rs index 2cb4ea1..95737bd 100644 --- a/credentialsd/src/dbus/gateway.rs +++ b/credentialsd/src/dbus/gateway.rs @@ -208,7 +208,7 @@ async fn query_connection_peer_binary( Some(RequestingApplication { name: command_name, - path: exe_path, + path: exe_path.to_string_lossy().to_string(), pid, }) }