| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| else: | ||
| zinfo._compresslevel = self.compresslevel | ||
|
|
||
| if zinfo.is_dir(): |
There was a problem hiding this comment.
Does this mean that write can no longer be used to create a directory? I suspect that will break existing code.
Sorry, something went wrong.
There was a problem hiding this comment.
This was marked as resolved, but I do not see an answer to my question.
Sorry, something went wrong.
There was a problem hiding this comment.
I think write still accepts directory zinfo, now it’s handled on line 1775 by calling mkdir instead of directly inline here.
There should be a test for write + directory; if not, then this PR needs to add one!
Sorry, something went wrong.
There was a problem hiding this comment.
Ah, right -- 1175 does handle that. Thanks!
A fairly quick scan of the tests doesn't reveal one using .write(some_directory/). @dignissimus please confirm such a test already exists, or add one.
Sorry, something went wrong.
There was a problem hiding this comment.
Very thorough PR. Question in-line.
Sorry, something went wrong.
|
interesting, since it is also possible to imply directories (if there is a file in there) but this would allow an empty directory |
Sorry, something went wrong.
|
@dignissimus : ping me in a few days if no one has merged this yet -- I want to give other folks the chance to review. |
Sorry, something went wrong.
|
@dignissimus Actually, I forgot: have you either verified or added a test for creating a directory using the existing write() method? (Yes, it should work -- nevertheless, a test is good). |
Sorry, something went wrong.
@ethanfurman The tests have been added! |
Sorry, something went wrong.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Add ZipFile.mkdir method to create directories inside zip archives.
https://bugs.python.org/issue4833