[bpo-45765] Fix distribution discovery on empty path. (GH-29487) (GH-29510)

(cherry picked from commit 6ec0dec7b7)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
This commit is contained in:
Miss Islington (bot) 2021-11-13 12:08:28 -08:00 committed by GitHub
parent 3f15792d60
commit ed55426acd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -748,7 +748,7 @@ class FastPath:
def children(self):
with suppress(Exception):
return os.listdir(self.root or '')
return os.listdir(self.root or '.')
with suppress(Exception):
return self.zip_children()
return []

View file

@ -0,0 +1 @@
In importlib.metadata, fix distribution discovery for an empty path.