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

CopyRequest does not use atomic write #153

Open
JanTvrdik opened this issue Aug 24, 2017 · 0 comments
Open

CopyRequest does not use atomic write #153

JanTvrdik opened this issue Aug 24, 2017 · 0 comments

Comments

@JanTvrdik
Copy link

JanTvrdik commented Aug 24, 2017

CopyRequest does not use atomic write, which may result in empty or corrupted zip filed in Composer cache directory.

CopyRequest should write the file to "$destination.tmp" and then rename("$destination.tmp", $destination) after the downloads succeeds.

You can find the corrupted files with

find ./files/ -type f -name '*.zip' -not -exec zip --quiet --test {} \;
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