-
-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output files are created even if encryption/decryption failed #57
Milestone
Comments
FiloSottile
added a commit
that referenced
this issue
Jan 2, 2021
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
FiloSottile
added a commit
that referenced
this issue
Jan 3, 2021
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
What were you trying to do
Decrypt a file without providing the
-i
argument and subsequently fix the mistake.What happened
The first decryption attempt already created an empty output file, and a next invocation with fixed argument refused to overwrite it.
Encryption
Creation of empty files is observed also when encrypting, when given incorrect
-r
argument:UX side
Apart from the incorrect, I assume, behaviour of creating empty files, I am not a fan of the no-overwrite policy. I think it would be better to match most unix tools' behaviour of overwriting by default or add an
-f/--force
flag.* would be nice to have
age --version
to properly check thatThe text was updated successfully, but these errors were encountered: