aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/crud/cli_new_pass.go2
-rw-r--r--internal/crud/cli_new_ssh.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/internal/crud/cli_new_pass.go b/internal/crud/cli_new_pass.go
index 2a8c2f4..2b01e13 100644
--- a/internal/crud/cli_new_pass.go
+++ b/internal/crud/cli_new_pass.go
@@ -153,7 +153,7 @@ func NewNotePassEdit(output, editorString string) error {
perm = noteInfo.Mode().Perm()
}
- err = os.WriteFile(output, encrypted, perm)
+ err = utils.WriteFileAtomic(output, encrypted, perm)
fmt.Println("New note saved at:", output)
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)