From: Charles McGarvey Date: Wed, 14 Feb 2018 16:18:37 +0000 (-0700) Subject: allow finding symlink pubkeys X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fgroupsecret;a=commitdiff_plain;h=10738b34290ac3cf0d7ee3098928213c77bc2840 allow finding symlink pubkeys --- 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; } } }