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

fix(ZipFS): support empty archives resulting from an unlink after write in getBufferAndClose #5179

Merged
merged 2 commits into from
Jan 6, 2023

Conversation

paul-soporan
Copy link
Member

What's the problem this PR addresses?

ZipFS.getBufferAndClose errors on an empty archive resulting from an unlink after write.

I forgot to add a test for this case in #3241.

Fixes https://github.com/yarnpkg/berry/actions/runs/3852391756/jobs/6564499446#step:6:9.

How did you fix it?

Added an early check that discards the archive and returns an empty archive buffer.

Checklist

  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@arcanis arcanis merged commit 920dc1e into master Jan 6, 2023
@arcanis arcanis deleted the paul/fix/getBufferAndClose-unlink-after-write branch January 6, 2023 10:12
merceyz pushed a commit that referenced this pull request Jan 29, 2023
…te in `getBufferAndClose` (#5179)

* fix(ZipFS): support empty archives resulting from an unlink after write in `getBufferAndClose`

* chore: update artifacts
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

Successfully merging this pull request may close these issues.

2 participants