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 unzip pattern and strip_root should be used together #17591

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

jusito
Copy link
Contributor

@jusito jusito commented Jan 17, 2025

Changelog: Bugfix: Make possible to use pattern and strip_root at the same time for conan.tools.files.unzip().
Docs: Omit

fixes #14455

Found today that during archive extraction pattern and strip_root can't be used together. Same as in the related issue I would expect that pattern is applied before strip_root but actually they currently can't be used together at all.

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
    • no info required because expected behaviour restored
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.
    • I guess this doesn't apply here?

@CLAassistant
Copy link

CLAassistant commented Jan 17, 2025

CLA assistant check
All committers have signed the CLA.

@memsharded memsharded added this to the 2.12.0 milestone Jan 17, 2025
Copy link
Contributor

@franramirez688 franramirez688 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks a lot for the contribution @jusito

I just suggested a small detail in one of the unittests.

test/unittests/tools/files/test_zipping.py Outdated Show resolved Hide resolved
@jusito jusito force-pushed the fix/untargz-pattern branch from 5f52fcd to c5db575 Compare January 21, 2025 08:59
@czoido czoido merged commit 127b1e4 into conan-io:develop2 Jan 21, 2025
33 checks passed
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.

strip_root behaviour with pattern differs between tools.unzip and tools.untargz
6 participants