Message154058
When a file inside a zip is open, the underlying zip file is open again.
(Unless the file name is unknown, because the ZipFile object was created with fp only.)
This design is incorrect, insecure, and ineffective:
- the reopen uses the same string as file name, but on unix-like systems that file name may no longer exist, or may point to a different file
- opening n files from the same zip archive consumes n OS file descriptors, wasting resources
I believe that the parent ZipFile object and all the child ZipExtFile objects should keep the same fp. The last one would close it.
I'm working on a patch currently. |
|
Date |
User |
Action |
Args |
2012-02-23 10:46:32 | kasal | set | recipients:
+ kasal |
2012-02-23 10:46:32 | kasal | set | messageid: <1329993992.32.0.270050568564.issue14099@psf.upfronthosting.co.za> |
2012-02-23 10:46:31 | kasal | link | issue14099 messages |
2012-02-23 10:46:31 | kasal | create | |
|