From e735735c3bc05d4e10b3f0b8eb8769c8ab70b638 Mon Sep 17 00:00:00 2001 From: SIGSEGV Date: Mon, 10 May 2021 19:08:49 +0800 Subject: [PATCH] Update pkg/cluster/ansible/import.go Co-authored-by: Allen Zhong --- pkg/cluster/ansible/import.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cluster/ansible/import.go b/pkg/cluster/ansible/import.go index a1101138c9..e6ead6966d 100644 --- a/pkg/cluster/ansible/import.go +++ b/pkg/cluster/ansible/import.go @@ -185,7 +185,7 @@ func diffConfigs(configs []map[string]interface{}) (global map[string]interface{ func CommentConfig(clsName string) error { dir := spec.ClusterPath(clsName, spec.AnsibleImportedConfigPath) err := filepath.Walk(dir, func(path string, info fs.FileInfo, err error) error { - if err != nil || info.IsDir() && !strings.HasSuffix(info.Name(), ".toml") { + if err != nil || info.IsDir() || !strings.HasSuffix(info.Name(), ".toml") { return nil }