Skip to content
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

[BUG] tar never emits close on extracting errors with files greater or equals than 31745 bytes with strict: false #264

Closed
ewnd9 opened this issue Nov 21, 2020 · 0 comments

Comments

@ewnd9
Copy link

ewnd9 commented Nov 21, 2020

What / Why

tar never emits close on extracting errors with files greater or equals than 31745 bytes with strict: false

Steps to Reproduce

https://github.com/ewnd9/tar-unpack-issue

  • the first complete is extracting in a new directory
  • the second complete is trying to overwrite to the previously created directory
$ git clone https://github.com/ewnd9/tar-unpack-issue
$ cd tar-unpack-issue
$ npm install
$ bash ./run.sh
31740 written in demo-in/input.txt
complete
complete
31741 written in demo-in/input.txt
complete
complete
31742 written in demo-in/input.txt
complete
complete
31743 written in demo-in/input.txt
complete
complete
31744 written in demo-in/input.txt
complete
complete
31745 written in demo-in/input.txt
complete
31746 written in demo-in/input.txt
complete

Expected Behavior

should emit close with strict: false

System info

  • macOS 10.15.7
  • node v12.19.0
  • npm 6.14.8
  • tar 6.0.5 (latest)
@isaacs isaacs closed this as completed in 84acbd3 Aug 4, 2021
isaacs added a commit that referenced this issue Aug 9, 2021
The fs-minipass WriteStream always returns false from a write() call if
it did not successfully open the file descriptor.  This makes the
Parse/Unpack stream get backed up if the file was large enough that it
did not already move on to the next entry in the archive.

Fix: #264
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant