allow finding symlink pubkeys
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 14 Feb 2018 16:18:37 +0000 (09:18 -0700)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 14 Feb 2018 16:18:37 +0000 (09:18 -0700)
lib/App/GroupSecret/File.pm

index 0cc42e81d1e0f952b37cfd37dee0f3b9fb70b547..4be3e5cb8ba04085fb56da420603a3e77d79c53e 100644 (file)
@@ -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;
         }
     }
 }
This page took 0.018038 seconds and 4 git commands to generate.