Skip to content

Commit 8848161

Browse files
committed
Use posixpath.split to avoid splitting on backslash on Windows
1 parent cff8de2 commit 8848161

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

importlib_metadata/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import operator
1111
import functools
1212
import itertools
13+
import posixpath
1314
import collections
1415

1516
from ._compat import (
@@ -410,7 +411,7 @@ def zip_children(self):
410411
self.joinpath = zip_path.joinpath
411412

412413
return (
413-
os.path.split(child)[0]
414+
posixpath.split(child)[0]
414415
for child in names
415416
)
416417

0 commit comments

Comments
 (0)