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
archive/tar: should treat empty tar files as invalid #31012
Comments
Personally, I think we should keep the current behavior since an empty file should be valid supposing the trailing 2 blocks of zeros is considered optional. Also, turning an empty file into an error now is likely to break people who have come to depend on this behavior. |
For other references,
|
I'm going to close this as working as intended:
|
What version of Go are you using (
go version
)?https://play.golang.org/
What did you do?
https://play.golang.org/p/VeyYROaJQZu
What did you expect to see?
An error to be printed, similar to how GNU tar produces an error when reading an empty file:
What did you see instead?
No error printed.
The text was updated successfully, but these errors were encountered: