This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-eyes.git
The following commit(s) were added to refs/heads/main by this push:
new 1cd6cb9 Fix infinite recursive calls when containing symbolic files
(#33)
1cd6cb9 is described below
commit 1cd6cb9b2d31b579e9aa62483118fae75097b16a
Author: Zhenxu <[email protected]>
AuthorDate: Thu May 27 22:26:26 2021 +0800
Fix infinite recursive calls when containing symbolic files (#33)
---
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
}