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

Avoid zip extract racing condition by using read+write instead extract #5707

Merged
merged 1 commit into from Jul 7, 2021

Commits on Dec 24, 2020

  1. Avoid zip extract racing condition by using read+write instead extract

    Extract also creates the folder hierarchy, however we do not need that,
    the file itself being extracted to a temporary folder is good enough.
    Instead we read the content of the zip and then write it. The write is
    not locked but it's OK to update the same file multiple times given the
    update operation will not alter the content of the file. By not creating
    the folder hierarchy (default via extract) we no longer can run into the
    problem of two parallel extracts both trying to create the folder
    hierarchy without exists ok flag, and one must fail.
    
    Resolves psf#5223.
    
    Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
    gaborbernat committed Dec 24, 2020
    Copy the full SHA
    1e7e905 View commit details
    Browse the repository at this point in the history