Fix trailing slash handling in pkg_resources.ZipProvider
Given a ZipProvider, if the underlying ZipImporter prefix is empty, then resource_listdir('') and resource_listdir('subdir/') fail, while resource_listdir('/') and resource_listdir('subdir') succeed. On the other hand, if the underlying ZipImport prefix is not empty, then resource_listdir('/') fails but resource_listdir('') succeeds. With this change, the cases listed succeed with or without trailing slashes.
Showing
Please register or sign in to comment