You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to search my source tree, I get the following error:
$ ack2 -l FOO
ack: .git: Permission denied
Can't call method "name" on an undefined value at d:/git/ack2/ack line 1247.
I was able to trace this back to App::Ack::Resource::Basic line 37, which attempts to open the file it's been passed for reading. If this file is a directory, then this attempt fails (yielding the "Permission denied" error) and the method returns no object (which explains the "Can't call method on undefined value" error immediately afterward). If I make a local modification to the module so line 37 reads
Actually, the "chmod 000" in this test is incorred. The directory in question had permissions of 755; the reason for the "Permission denied" error is because Basic.pm was trying to use open() to read a directory instead of opendir(), and under strawberry perl, that fails with a "Permission denied" error.
This test, as coded, does not test for the described error.
Ah, it's under Strawberry Perl. I don't have an environment in which to test that; would you mind correcting the test, please? A fixup patch would be nice, too! =)
When I try to search my source tree, I get the following error:
$ ack2 -l FOO
ack: .git: Permission denied
Can't call method "name" on an undefined value at d:/git/ack2/ack line 1247.
I was able to trace this back to App::Ack::Resource::Basic line 37, which attempts to open the file it's been passed for reading. If this file is a directory, then this attempt fails (yielding the "Permission denied" error) and the method returns no object (which explains the "Can't call method on undefined value" error immediately afterward). If I make a local modification to the module so line 37 reads
if ((! -d $self->{filename}) && !open( $self->{fh}, '<', $self->{filename} ) ) {
then I get the following output:
$ ack2 -l FOO
Doxyfile
lib/GA/MiddleTier/Ops/Sync/WizardData/Mssql.pm
The text was updated successfully, but these errors were encountered: