Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
therealpaulgg committed Apr 3, 2024
1 parent 14c8951 commit 1998400
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pkg/utils/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,7 @@ func WriteKey(key []byte, filename string, sshDirectory string) error {
return err
}
}
// check if file exists (for conflict)
_, err = os.OpenFile(filepath.Join(p, filename), os.O_RDONLY, 0600)
// if the file exists, hash the contents of the file and compare it to the key
// if the hashes differ, let the user know and ask them to resolve the conflict
if err != nil && !errors.Is(err, os.ErrNotExist) {
return err
} else if err == nil {
Expand Down

0 comments on commit 1998400

Please sign in to comment.