Skip to content

Commit 5d4c32c

Browse files
authored
Merge pull request #128 from linux-credentials/push-qknnzzyyqrpk
daemon: Use string instead of PathBuf for app path
2 parents a6679dd + 4d8699e commit 5d4c32c

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

credentialsd-common/src/model.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{fmt::Display, path::PathBuf};
1+
use std::fmt::Display;
22

33
use serde::{Deserialize, Serialize};
44
use zvariant::{SerializeDict, Type};
@@ -99,7 +99,7 @@ impl Transport {
9999
#[derive(Debug, Default, Clone, Serialize, Deserialize, Type)]
100100
pub struct RequestingApplication {
101101
pub name: String,
102-
pub path: PathBuf,
102+
pub path: String,
103103
pub pid: u32,
104104
}
105105

credentialsd-ui/src/gui/view_model/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl<F: FlowController + Send> ViewModel<F> {
107107
subtitle = subtitle.replace("%s1", &self.rp_id);
108108
subtitle = subtitle.replace("%i1", &format!("{}", requesting_app.pid));
109109
subtitle = subtitle.replace("%s2", &requesting_app.name);
110-
subtitle = subtitle.replace("%s3", &requesting_app.path.to_string_lossy());
110+
subtitle = subtitle.replace("%s3", &requesting_app.path);
111111
self.title = title;
112112
self.subtitle = subtitle;
113113
self.tx_update

credentialsd/src/dbus/gateway.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ async fn query_connection_peer_binary(
208208

209209
Some(RequestingApplication {
210210
name: command_name,
211-
path: exe_path,
211+
path: exe_path.to_string_lossy().to_string(),
212212
pid,
213213
})
214214
}

0 commit comments

Comments
 (0)