diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-16 05:53:06 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-16 05:53:06 -0400 |
commit | c83657307e4ba5d414389c0e012ecf789053f763 (patch) | |
tree | e8d4fc61e9ee08e63713058d4808ce093b34213c | |
parent | bcafba47e8c384a13315d998eb1ba17e9aaf16f9 (diff) |
Fix delete SSH key in file
-rw-r--r-- | models/publickey.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/publickey.go b/models/publickey.go index 3171e268..6aed7c57 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. |