X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fgroupsecret;a=blobdiff_plain;f=lib%2FApp%2FGroupSecret%2FFile.pm;fp=lib%2FApp%2FGroupSecret%2FFile.pm;h=4be3e5cb8ba04085fb56da420603a3e77d79c53e;hp=0cc42e81d1e0f952b37cfd37dee0f3b9fb70b547;hb=10738b34290ac3cf0d7ee3098928213c77bc2840;hpb=877f7312c2a0764da6b65c450ace62b816a5c5cb diff --git a/lib/App/GroupSecret/File.pm b/lib/App/GroupSecret/File.pm index 0cc42e8..4be3e5c 100644 --- a/lib/App/GroupSecret/File.pm +++ b/lib/App/GroupSecret/File.pm @@ -365,7 +365,7 @@ sub find_public_key { my @dirs = split(/:/, $ENV{GROUPSECRET_PATH} || ".:keys:$ENV{HOME}/.ssh"); for my $dir (@dirs) { my $filepath = File::Spec->catfile($dir, $key->{filename}); - return $filepath if -f $filepath; + return $filepath if -e $filepath && !-d $filepath; } } }