-
-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/age: lazily open output file at first write
This avoids leaving behind an empty file when an error occurs before we write the header (for example, because the passphrase is invalid). Do a best-effort check before taking user input for whether the file exists so we don't waste user effort. An error might still happen after user input if other kind of open errors happen (for example, a permission issue, or disk full). Fixes #159 Fixes #57 Closes #169
- Loading branch information
1 parent
02ee8b9
commit 97b6569
Showing
1 changed file
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters