This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch fix/infinite-recursive
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git

commit 4da93f75208a6fd8eca7d14142a95eee50272e52
Author: kezhenxu94 <[email protected]>
AuthorDate: Thu May 27 21:08:39 2021 +0800

    Fix infinite recursive calls when containing symbolic files
---
 pkg/header/check.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/pkg/header/check.go b/pkg/header/check.go
index 0bdccb5..b7b87c1 100644
--- a/pkg/header/check.go
+++ b/pkg/header/check.go
@@ -90,6 +90,9 @@ func checkPath(path string, result *Result, config 
*ConfigHeader) error {
                        if info.IsDir() {
                                return nil
                        }
+                       if p == path { // when p is symbolic link file, it 
causes infinite recursive calls
+                               return nil
+                       }
                        if err := checkPath(p, result, config); err != nil {
                                return err
                        }

Reply via email to