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:name set to empty string for "/" #4647
Comments
From @jimavThis is a bug report for perl from james_avera@yahoo.com, #!/usr/bin/perl -w die "must be root" unless ($> == 0); # The following block sets up a small chroot test directory and runs # Here is the test itself Flags: Site configuration information for perl v5.6.1: Configured by root at Thu Sep 20 02:27:59 GMT 2001. Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Locally applied patches: @INC for perl v5.6.1: Environment for perl v5.6.1: |
From [Unknown Contact. See original ticket]james_avera@yahoo.com wrote:
This is a patch fixing the bug reported as [ID 20011206.007] against The same patch can be applied to the 5.6.0 version. All tests in filefind.t v5.6.0 still show ok. Regards, *** lib/File/Find.pm.orig Sun Dec 9 11:26:20 2001 |
From @gsarOn Sun, 09 Dec 2001 13:45:06 +0100, "Wolfgang Laun" wrote:
There appear to be three other similar places that will be hit when Thanks. Sarathy |
From [Unknown Contact. See original ticket]-----BEGIN PGP SIGNED MESSAGE----- Moin, Gurusamy Sarathy <gsar@ActiveState.com> wrote.
Wouldn't it be better to write that as: Certainly shorter and should do the same (I hope ;) Btw, I think File::Spec could also be used - not anyone has '/' as a root Cheers, Tels - -- http://bloodgate.com/perl My current Perl projects -----BEGIN PGP SIGNATURE----- iQEVAwUBPBPjSncLPEOTuEwVAQFKhgf+IXFqCFGvHAJoOQQ52Pog2wy9uNWTWwnN |
From [Unknown Contact. See original ticket]Tels <perl_dummy@bloodgate.com> wrote:
[ ...possibly required in other places as well... ]
It still misses the case where '/.' needs to become '/'. You can hit_1 ... /foo/bar/blech/. => /foo/bar/blech Find ... code as in the above patch Benchmark: timing 500000 iterations of Find_hit_1, Find_hit_2, Since hit_1 and miss are the frequent cases, root dirs being indeed
Gaining what? It'd require an extensive rewrite of File::Find, and most Regards, |
From [Unknown Contact. See original ticket]-----BEGIN PGP SIGNED MESSAGE----- Moin, On 11-Dec-01 Wolfgang Laun tried to scribble about:
I shouldn't post without two cups of coffee and actually trying what I
That File::Find work's on more platforms (possible)?
That is the biggest argument against it ;)
Some people prefer slow, working programs that return the correct result to But Murphy says never touch running things... ;) Cheers, Tels - -- http://bloodgate.com/perl My current Perl projects -----BEGIN PGP SIGNATURE----- iQEVAwUBPBZB63cLPEOTuEwVAQHVnQf/RA4tSuVmST5MrEFuVQUEzKs4FfRViMbQ |
From [Unknown Contact. See original ticket]On 09.12.01 at 11:31 Gurusamy Sarathy wrote:
What we should learn from Ents: not to be too hasty ;-) There's indeed one other place where $File::Find::name is Regards, *** lib/File/Find.pm.orig Tue Dec 11 18:04:44 2001 |
From [Unknown Contact. See original ticket]On Tue, 11 Dec 2001 02:24:03 -0700, Wolfgang Laun wrote:
For what it's worth, I started on that a couple of months ago, and got bogged http://wgz.org/chromatic/perl/File-Find.tar.gz -- c |
From [Unknown Contact. See original ticket]Gurusamy Sarathy <gsar@ActiveState.com> wrote:
It may indeed be safer to have $_ never be equal to "" since
I hope to have clarified this with an insert into the pod section.
I've patched all occurences of the /. substitution (just to be on if( $no_chdir ){ Thanks for the prodding ;-) *** lib/File/Find.pm.orig Tue Dec 11 18:04:44 2001 --- 720,729 ---- |
From @schwernHas this been fixed? Can we resolve this bug? |
@smpeters - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#7998 (status was 'resolved')
Searchable as RT7998$
The text was updated successfully, but these errors were encountered: