mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-05-29 05:40:47 +00:00
Fix bug about nonexistent groups in groups column
This commit is contained in:
parent
b337f9174d
commit
68cd6d5da1
7
unix.rs
7
unix.rs
|
@ -73,8 +73,11 @@ impl Unix {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn is_group_member(&self, gid: u32) -> bool {
|
||||
*self.groups.get(&gid)
|
||||
pub fn is_group_member(&mut self, gid: u32) -> bool {
|
||||
// Groups that no longer exist have no members. If this method
|
||||
// is called before a group with the given gid has been read,
|
||||
// it doesn't exist, so insert false.
|
||||
*self.groups.find_or_insert(gid, false)
|
||||
}
|
||||
|
||||
pub fn get_user_name(&mut self, uid: u32) -> Option<String> {
|
||||
|
|
Loading…
Reference in New Issue
Block a user