mirror of
https://github.com/FiloSottile/age.git
synced 2026-04-22 20:10:30 +00:00
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