Skip to content

Path(rootdir).glob('**/*') aborts without reason.  #93286

@ntosis

Description

@ntosis

Bug report

When I use the command Path(rootdir).glob('**/*') to find all files in a directory recursive the glob command aborts

Your environment

windows 10

This is the error message, when I navigate with explorer into this directory I can see a file.
I think glob cannot handle a very large path.

for i in Path(rootdir).glob('**/*'):
File "C:\Tools\Python\Python37-64\lib\pathlib.py", line 1093, in glob
for p in selector.select_from(self):
File "C:\Tools\Python\Python37-64\lib\pathlib.py", line 553, in _select_from
for p in successor_select(starting_point, is_dir, exists, scandir):
File "C:\Tools\Python\Python37-64\lib\pathlib.py", line 510, in _select_from
entries = list(scandir(parent_path))
FileNotFoundError: [WinError 3] the system cannot find the path: '\\dek-scf35\build_data\sandboxes\ntosis\300BM\MICROSAR\ThirdParty\Mcal_Tc3xx\Supply\MC-ISAR_AS42x_AURIX2G_TC38xA_TC39xB_BASIC_1.0.0-beta\DemoWorkspace\McalDemo\TC38A\1_ToolEnv\2_Tresos\.metadata\.plugins\org.eclipse.core.resources\.projects\DemoApp\.indexes'

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions