From 36eba281576afe0f67e5aafb4e7a414f256dba31 Mon Sep 17 00:00:00 2001 From: Fernando Ayats Date: Sun, 14 Jan 2024 17:54:48 +0100 Subject: [PATCH] Only scan users 1000-1100 Closes #62 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/clean.rs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bca2e0d..e8b5fd8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -764,7 +764,7 @@ dependencies = [ [[package]] name = "nh" -version = "3.5.1" +version = "3.5.2" dependencies = [ "ambassador", "anstyle", diff --git a/Cargo.toml b/Cargo.toml index 7130151..ffe8fd8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nh" -version = "3.5.1" +version = "3.5.2" edition = "2021" license = "EUPL-1.2" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/clean.rs b/src/clean.rs index 81bdb9a..8599b55 100644 --- a/src/clean.rs +++ b/src/clean.rs @@ -56,8 +56,9 @@ impl NHRunnable for interface::CleanMode { let path = read_dir?.path(); profiles.extend(profiles_in_dir(path)); } + debug!("Scanning XDG profiles for users 0, 1000-1100"); for user in unsafe { uzers::all_users() } { - if user.uid() >= 1000 || user.uid() == 0 { + if user.uid() >= 1000 && user.uid() < 1100 || user.uid() == 0 { debug!(?user, "Adding XDG profiles for user"); profiles.extend(profiles_in_dir( user.home_dir().join(".local/state/nix/profiles"),