From c83657307e4ba5d414389c0e012ecf789053f763 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 16 Mar 2014 05:53:06 -0400 Subject: [PATCH] Fix delete SSH key in file --- models/publickey.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/publickey.go b/models/publickey.go index 3171e268f..6aed7c574 100644 --- a/models/publickey.go +++ b/models/publickey.go @@ -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.