mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-23 03:42:15 +08:00
Fix delete SSH key in file
This commit is contained in:
parent
bcafba47e8
commit
c83657307e
|
@ -134,7 +134,7 @@ func DeletePublicKey(key *PublicKey) (err error) {
|
|||
}
|
||||
|
||||
// Found the line and copy rest of file.
|
||||
if strings.Contains(line, key.Content) {
|
||||
if strings.Contains(line, fmt.Sprintf("key-%d", key.Id)) && strings.Contains(line, key.Content) {
|
||||
continue
|
||||
}
|
||||
// Still finding the line, copy the line that currently read.
|
||||
|
|
Loading…
Reference in New Issue
Block a user