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

stdlib: Fix zip:unzip on read-only directory with content #9335

Conversation

garazdawi
Copy link
Contributor

The permissions were set on extrected directories before the files within were extracted, making it impossible to create the files within. This commit delays all directory permissions to after all files/directories have been created so that they can all be set.

Closed #9332

@garazdawi garazdawi added team:VM Assigned to OTP team VM fix testing currently being tested, tag is used by OTP internal CI labels Jan 23, 2025
@garazdawi garazdawi requested a review from bjorng January 23, 2025 09:17
@garazdawi garazdawi self-assigned this Jan 23, 2025
@garazdawi garazdawi changed the title stdlib: Fix zip:unzip or read-only directory with content stdlib: Fix zip:unzip on read-only directory with content Jan 23, 2025
@garazdawi garazdawi force-pushed the lukas/stdlib/zip-permission-directories/OTP-19447 branch from df24a9d to 8a73aad Compare January 23, 2025 09:17
Copy link
Contributor

github-actions bot commented Jan 23, 2025

CT Test Results

    2 files     95 suites   1h 6m 27s ⏱️
2 159 tests 2 111 ✅ 48 💤 0 ❌
2 518 runs  2 468 ✅ 50 💤 0 ❌

Results for commit 5e00369.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@trashhalo
Copy link

You could use the test zip I included in the issue in a integration test. Its just a readme file with the text hello world in a read only folder.

The permissions were set on extrected directories before the files within
were extracted, making it impossible to create the files within. This
commit delays all directory permissions to after all files/directories
have been created so that they can all be set.

Closed erlang#9332
@garazdawi garazdawi force-pushed the lukas/stdlib/zip-permission-directories/OTP-19447 branch from 5e00369 to d384e2a Compare January 28, 2025 14:26
@garazdawi garazdawi merged commit b4982dd into erlang:maint Jan 28, 2025
9 checks passed
@garazdawi garazdawi added this to the OTP-27.3 milestone Jan 28, 2025
@garazdawi
Copy link
Contributor Author

I tested locally with your file and the additions to the test suite trigger the same fault, so I think we are good without that file. Fix is merged for release in Erlang/OTP 27.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unzipping a file with with read only permissions on its zipped folders breaks
2 participants