parent
50d73bfbc8
commit
6989acee63
|
@ -16,7 +16,9 @@ def generate_directories(path):
|
||||||
if os.path.isdir(path):
|
if os.path.isdir(path):
|
||||||
yield path
|
yield path
|
||||||
while True:
|
while True:
|
||||||
if os.path.ismount(path):
|
# Work around https://github.com/python/cpython/issues/96192
|
||||||
|
_path = os.fsdecode(path) if isinstance(path, bytes) else path
|
||||||
|
if os.path.ismount(_path):
|
||||||
break
|
break
|
||||||
old_path = path
|
old_path = path
|
||||||
path = os.path.dirname(path)
|
path = os.path.dirname(path)
|
||||||
|
|
Loading…
Reference in New Issue