summaryrefslogtreecommitdiffstats
path: root/src/removable_devices.rs
diff options
context:
space:
mode:
authorqkzk <qu3nt1n@gmail.com>2023-10-30 21:58:43 +0100
committerqkzk <qu3nt1n@gmail.com>2023-10-30 21:58:43 +0100
commitcd1f70191b6067e258328424bf5acf13dbfb5880 (patch)
tree7469dc028000a86ce7e3cb2d74adcfc8859497c5 /src/removable_devices.rs
parentd3493b79579b59bf8ecad1ce5225b27aa910d848 (diff)
replace `users` crate by `pgs` and a simple struct.
Diffstat (limited to 'src/removable_devices.rs')
-rw-r--r--src/removable_devices.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/removable_devices.rs b/src/removable_devices.rs
index 323bac1..7759c83 100644
--- a/src/removable_devices.rs
+++ b/src/removable_devices.rs
@@ -3,7 +3,7 @@ use anyhow::{anyhow, Result};
use crate::{
constant_strings_paths::GIO,
impl_selectable_content,
- utils::{is_dir_empty, is_program_in_path},
+ utils::{current_uid, is_dir_empty, is_program_in_path},
};
/// Holds info about removable devices.
@@ -83,7 +83,7 @@ impl Removable {
.replace('/', "")
.trim()
.to_owned();
- let uid = users::get_current_uid();
+ let uid = current_uid()?;
let path = format!("/run/user/{uid}/gvfs/mtp:host={device_name}");
let pb_path = std::path::Path::new(&path);
let is_mounted = pb_path.exists() && !is_dir_empty(pb_path)?;