diff --git a/gix-sec/src/identity.rs b/gix-sec/src/identity.rs index a9633b18f8a..3e260e72305 100644 --- a/gix-sec/src/identity.rs +++ b/gix-sec/src/identity.rs @@ -187,12 +187,12 @@ mod impl_ { } // Admin-group owned folders are considered owned by the current user, if they are in the admin group - if IsWellKnownSid(token_owner, WinBuiltinAdministratorsSid) == 0 { + if IsWellKnownSid(folder_owner, WinBuiltinAdministratorsSid) == 0 { return Ok(false); } let mut is_member = 0; - if CheckTokenMembership(0, token_owner, &mut is_member) == 0 { + if CheckTokenMembership(0, folder_owner, &mut is_member) == 0 { error!("Couldn't check if user is an administrator"); }