Skip to content

File::Find::fullname is always undef on Windows 10 #21143

@jimav

Description

@jimav

If File::Find is run with follow => 1 on Windows, $File::Find::fullname is always undef.

As the docs say, "follow ... is also a no-op on Win32", literally, i.e. $fullname is not implemented at all and so is always undef.

This seems unsafe because scripts written to handle symlinks must check File::Find::fullname for undef to avoid wrongly following broken links, and as a result such scripts think every file is a broken link on Windows.

I'm wondering if it would be better to set fullname to name on Win32 (and also guarantee to stat the file so the "_" handle is valid) so scripts can more often work as-is without having to hack around with $^O in the wanted function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions