• Doug Greiman's avatar
    Fix trailing slash handling in pkg_resources.ZipProvider · 7b8b56fa
    Doug Greiman authored
    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.
    7b8b56fa
__init__.py 104 KB