Skip to content

fix unzip pattern and strip_root should be used together#17591

Merged
czoido merged 1 commit into
conan-io:develop2from
jusito:fix/untargz-pattern
Jan 21, 2025
Merged

fix unzip pattern and strip_root should be used together#17591
czoido merged 1 commit into
conan-io:develop2from
jusito:fix/untargz-pattern

Conversation

@jusito
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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.

Comment thread test/unittests/tools/files/test_zipping.py Outdated
@jusito jusito force-pushed the fix/untargz-pattern branch from 5f52fcd to c5db575 Compare January 21, 2025 08:59
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

7 participants