Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File::Find can fail in windows #20306

Open
Rob-Kirkby opened this issue Sep 16, 2022 · 3 comments
Open

File::Find can fail in windows #20306

Rob-Kirkby opened this issue Sep 16, 2022 · 3 comments

Comments

@Rob-Kirkby
Copy link

Module:File::Find

Description

In windows a stupidly long and straggly directory structure can defeat the find() traverse process.
bug_report.txt

Steps to Reproduce

run these scripts (usage is in bug_report.txt above)
mk_tst.bat.txt
tst_find.bat.txt
tst_find_log.bat.txt

GitHub rejects .bat files, so you'll have to strip their .txt suffix

From the 3rd script I got
STDOUT tst_find_1.log
STDERR tst_find_2.log
(produced on a Win7 system)

Expected behavior

That find() shall traverse any possible tree, even one constructed through incompetence, malice, or runaway software.

Pro tem I butchered my copy of find.pm - see bug_report.txt above

Perl configuration

This is perl 5, version 32, subversion 1 (v5.32.1) built for MSWin32-x64-multi-thread
@Leont
Copy link
Contributor

Leont commented Sep 16, 2022

I suspect this is the same bug as #19995 and should be fixed by #20008

@Rob-Kirkby
Copy link
Author

Rob-Kirkby commented Sep 17, 2022 via email

@tonycoz
Copy link
Contributor

tonycoz commented Apr 20, 2023

I suspect this is running into buffer length limits inside win32/win32.c rather than anything to do with symlinks.

Windows itself has some limits, but I don't think this is quite running into them.

https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants