cpython icon indicating copy to clipboard operation
cpython copied to clipboard

gh-117084: Fix zip extraction bug

Open fliiiix opened this issue 1 year ago • 3 comments

On Windows a directory is ending in \ and not /.

This is the smallest fix i could think of. Not sure if there are edge cases with files containing \\ at the end.

  • Issue: gh-117084

fliiiix avatar Mar 20 '24 15:03 fliiiix

All commit authors signed the Contributor License Agreement.
CLA signed

ghost avatar Mar 20 '24 15:03 ghost

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

bedevere-app[bot] avatar Mar 20 '24 15:03 bedevere-app[bot]

Thank you for your contribution @fliiiix. I have two requirements:

  • It should not change the behavior on non-Windows platforms by default. The logic should match the logic of the extraction code.
  • Tests are required.

Creating specific tests is something non-trivial task, so instead of guiding you to find the right solution (which I myself didn't know at first), it was easier for me to do it myself (#117129). Anyway, thank you. I hope for fruitful cooperation in the future.

serhiy-storchaka avatar Mar 21 '24 15:03 serhiy-storchaka

so instead of guiding you to find the right solution

Did you just denied my first contribution to cpython? :cry:

fliiiix avatar Mar 22 '24 07:03 fliiiix

I'm sorry. But now that you've taken the first steps, cloned the repository, and created your first PR, creating other PRs should be much easier, so I look forward to your contribution in the future.

serhiy-storchaka avatar Mar 22 '24 10:03 serhiy-storchaka