From 0150e370942c257c7a8d6dd9c2a2f6c02177c78b Mon Sep 17 00:00:00 2001 From: AtomicFS Date: Thu, 5 Dec 2024 15:35:06 +0100 Subject: [PATCH] fix(action): skipping .git - we wanted to skip .git directory - submodules contain .git file - returning 'filepath.SkipDir' on '.git' file skips the directory in which the file is Signed-off-by: AtomicFS --- action/filesystem/filesystem.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action/filesystem/filesystem.go b/action/filesystem/filesystem.go index d8ece70c..ffa52d49 100644 --- a/action/filesystem/filesystem.go +++ b/action/filesystem/filesystem.go @@ -232,7 +232,7 @@ func AnyFileNewerThan(path string, givenTime time.Time) (bool, error) { if errors.Is(err, ErrPathIsDirectory) { errMod := filepath.WalkDir(path, func(path string, info os.DirEntry, _ error) error { // skip .git - if info.Name() == ".git" { + if info.Name() == ".git" && info.IsDir() { return filepath.SkipDir } if !info.IsDir() {