aboutsummaryrefslogtreecommitdiff
path: root/internal/crud/cli_new_pass.go
diff options
context:
space:
mode:
authorishaan <contact@ishaan.cc>2026-08-20 14:07:50 +0530
committerishaan <contact@ishaan.cc>2026-08-20 14:07:50 +0530
commitb60ef6b303c01039107cdf6433642cfb0b337557 (patch)
treebb10c6583e9b7ec9cee987511c74f72e1ec4ba7a /internal/crud/cli_new_pass.go
parent7caaf4c96d4f657d9193baf48e9745c9f68181c9 (diff)
implement atomic writes
Diffstat (limited to 'internal/crud/cli_new_pass.go')
-rw-r--r--internal/crud/cli_new_pass.go2
1 files changed, 1 insertions, 1 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)