diff options
| -rw-r--r-- | pkg_resources/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 73334641..ffaf7aca 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -1693,6 +1693,10 @@ class ZipProvider(EggProvider): def _zipinfo_name(self, fspath): # Convert a virtual filename (full path to file) into a zipfile subpath # usable with the zipimport directory cache for our target archive + while fspath.endswith(os.sep): + fspath = fspath[:-1] + if fspath == self.loader.archive: + return '' if fspath.startswith(self.zip_pre): return fspath[len(self.zip_pre):] raise AssertionError( |
