diff --git a/ansible/roles/dev-desktop/files/team_login/src/main.rs b/ansible/roles/dev-desktop/files/team_login/src/main.rs index ae31b1c7f..b59f3f046 100644 --- a/ansible/roles/dev-desktop/files/team_login/src/main.rs +++ b/ansible/roles/dev-desktop/files/team_login/src/main.rs @@ -95,15 +95,11 @@ fn main() -> Result<(), Box> { for entry in std::fs::read_dir(KEY_DIR)? { let entry = entry?; let path = entry.path(); - if !path.is_file() { - if let Some(extension) = path.extension() { - if extension == "keys" { - if let Some(stem) = path.file_stem() { - if let Some(stem) = stem.to_str() { - if stem.starts_with("gh-") && !users.contains(stem) { - std::fs::remove_file(path)?; - } - } + if path.is_file() { + if let Some(stem) = path.file_stem() { + if let Some(stem) = stem.to_str() { + if stem.starts_with("gh-") && !users.contains(stem) { + std::fs::remove_file(path)?; } } }