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::find can fail to chdir out of a long length named directory #9001
Comments
From adavies@ptc.comHowdy All. On Windows XP i've seen File::Find::find fail with: Can't cd to /dir/xxx/####../../.. where the #'s are a long filename (~256 characters) [Also note the error message does not include a separating '/' It looks like chdir() is hitting some kind of too long pathname issue. Here's a testcase that shows the problem: # %< chdir '/' or die $!; my $root_dir = '/long_dir_test'; -d $root_dir || mkdir($root_dir) || die "can't mkdir # Make a maximally length named directory chdir('/') || die "can't chdir to /: $!\n"; File::Find::find(sub {}, $root_dir); # this should die By changing the code in File::Find to do multiple individual while ( defined ($SE = pop @Stack) ) { I'm not sure how this affects performance - probably for the worse :-( Cheers, alex. |
From adavies@ptc.comCreated by adavies@ptc.comOn Windows XP i've seen File::Find::find fail with: Can't cd to /dir/####../../.. where the #'s are a long filename (~256 characters) [Also note the error message does not include a separating '/' It looks like chdir("../../../..") is hitting some kind of Here's a testcase that shows the problem: # %< chdir '/' or die $!; my $root_dir = '/long_dir_test'; -d $root_dir || mkdir($root_dir) || die "can't mkdir # Make a maximally length named directory chdir('/') || die "can't chdir to /: $!\n"; File::Find::find(sub {}, $root_dir); # this should die By changing the code in File::Find to do multiple individual while ( defined ($SE = pop @Stack) ) { I'm not sure how this affects performance - probably for the worse :-( Cheers, alex. Perl Info
|
From @rgsOn 21/08/07, via RT Davies, Alex <perlbug-followup@perl.org> wrote:
It's probably better to fix it in chdir() instead of putting a |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#44819 (status was 'open')
Searchable as RT44819$
The text was updated successfully, but these errors were encountered: