From 1adcde5800e79fe25c23a9d8f745044b88238d66 Mon Sep 17 00:00:00 2001 From: LiorLieberman Date: Thu, 15 Apr 2021 12:21:27 +0300 Subject: [PATCH] Ignore folders start with . --- pkg/services/repo_service.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/services/repo_service.go b/pkg/services/repo_service.go index f8728fec..eded55e8 100644 --- a/pkg/services/repo_service.go +++ b/pkg/services/repo_service.go @@ -5,6 +5,7 @@ import ( "io/ioutil" "os" "path/filepath" + "strings" "github.com/argoproj/argo-cd/pkg/apis/application/v1alpha1" "github.com/argoproj/argo-cd/reposerver/apiclient" @@ -99,7 +100,7 @@ func (a *argoCDService) GetDirectories(ctx context.Context, repoURL string, revi } fname := info.Name() - if fname == ".git" { // Skip repository metadata + if strings.HasPrefix(fname, ".") { // Skip all folders starts with "." return filepath.SkipDir }