From cd1f70191b6067e258328424bf5acf13dbfb5880 Mon Sep 17 00:00:00 2001 From: qkzk Date: Mon, 30 Oct 2023 21:58:43 +0100 Subject: replace `users` crate by `pgs` and a simple struct. --- src/removable_devices.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/removable_devices.rs') 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)?; -- cgit v1.2.3