diff options
| author | ishaan <contact@ishaan.cc> | 2026-08-20 14:07:50 +0530 |
|---|---|---|
| committer | ishaan <contact@ishaan.cc> | 2026-08-20 14:07:50 +0530 |
| commit | b60ef6b303c01039107cdf6433642cfb0b337557 (patch) | |
| tree | bb10c6583e9b7ec9cee987511c74f72e1ec4ba7a /internal/crud/cli_new_ssh.go | |
| parent | 7caaf4c96d4f657d9193baf48e9745c9f68181c9 (diff) | |
implement atomic writes
Diffstat (limited to 'internal/crud/cli_new_ssh.go')
| -rw-r--r-- | internal/crud/cli_new_ssh.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/crud/cli_new_ssh.go b/internal/crud/cli_new_ssh.go index 2a69223..797e769 100644 --- a/internal/crud/cli_new_ssh.go +++ b/internal/crud/cli_new_ssh.go @@ -226,7 +226,7 @@ func NewNoteSSHEdit(output string, defaultPubKeyBytes []byte, defaultPrivKeyPath perm = noteInfo.Mode().Perm() } - err = os.WriteFile(output, encrypted, perm) + err = utils.WriteFileAtomic(output, encrypted, perm) fmt.Println("New note saved at:", output) |