Skip to content

Mac SDK: DirectoryInfo.EnumerateDirectories and DirectoryInfo.EnumerateFiles Method does not handle symbolic link very well #34363

@bahdahshin

Description

@bahdahshin

Issue Title

Mac SDK: DirectoryInfo.EnumerateDirectories Method does not handle symbolic link very well

General

I made a recursive call to DirectoryInfo.EnumerateDirectories to get subdirectories and files.
It works on Windows 10 and Ubuntu 18.04. However, it crashes on Mac OS High Sierra 10.13.6. After further investigation, it seems to be caught in an infinite loop when it detects a symbolic link.
I tried to replicate the issue on Windows 10 and the code seems to ignore them. I haven't tested Ubuntu yet.

If the expectation is to allow the method to be consistent in both Mac and Windows, I think this should be considered a bug.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions