Skip to content

path/filepath: Walk walks recursive NTFS junction points #10424

Closed
@ClusterCat

Description

@ClusterCat

go Version 1.4.2
Windows 7, AMD64

When using filepath.Walk on an NTFS Volume it follows NTFS junction points.
If there are junction points which point to a parent directory, this leads to recursion and following errors.

Example:
Windows 7 creates the junction points:
C:\Users\username\Local Settings -> C:\Users\username\AppData\local
C:\Users\username\Local Settings\Application Data -> C:\Users\username\AppData\local

which leads to errors like:
GetFileAttributesEx C:\Users\username\Local Settings\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Application Data\Temp\go-build168935239: The system cannot find the file specified.

I expected Walk to not follow junction points, in accordance to the behavior of not following symlinks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions