gh-68164: Set the "regular file" bit in zipfile's writestr#134232
gh-68164: Set the "regular file" bit in zipfile's writestr#134232thatch wants to merge 2 commits into
Conversation
|
@vstinner trivial change for writestr from 10-year-old bugreport I left the ZipInfo default alone -- anyone using ZipInfo.from_file already sets this bit, and changing the default breaks anyone trying to set the symlink bit with |
|
This PR is stale because it has been open for 30 days with no activity. |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
LGTM, but I am not sure whether it was necessary to use named constants.
| self.compress_type = archive.compression | ||
| self.compress_level = archive.compresslevel | ||
| if self.filename.endswith('/'): # pragma: no cover | ||
| self.external_attr = 0o40775 << 16 # drwxrwxr-x |
There was a problem hiding this comment.
I think it is fine to use the hardcoded value. It is the same on all supported platforms.
|
Would you like me to change the constants back, rebase, etc -- or is this already in your merge queue? |
|
I just want to hear your arguments. If this is not important to you, then I would prefer to return to hardcoded constants, for smaller diff. |
|
Will do. |
Uh oh!
There was an error while loading. Please reload this page.