From 9be659b1a88e1fa0477f1062c4b28037409f5715 Mon Sep 17 00:00:00 2001 From: Yusuke Kadowaki Date: Thu, 11 Jan 2024 15:01:33 +0900 Subject: [PATCH] Fix isSymlink function to correctly check for symbolic links (#2292) --- hack/license/gen/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/license/gen/main.go b/hack/license/gen/main.go index 6ae6618718..ecb4dcc3ce 100644 --- a/hack/license/gen/main.go +++ b/hack/license/gen/main.go @@ -231,7 +231,7 @@ func isSymlink(path string) (bool, error) { if err != nil { return false, err } - return lst.Mode()&os.ModeSymlink != 0, nil + return lst.Mode()&os.ModeSymlink == os.ModeSymlink, nil } func readAndRewrite(path string) error {