From 3611ec7d099c285f7d21efdbefd50be41642d925 Mon Sep 17 00:00:00 2001 From: link Date: Tue, 7 Feb 2023 21:58:01 +0800 Subject: [PATCH] Return directly if name does not exist (#871) --- pkg/utils/file/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/utils/file/file.go b/pkg/utils/file/file.go index 1ce50d1..a14ffb6 100644 --- a/pkg/utils/file/file.go +++ b/pkg/utils/file/file.go @@ -581,7 +581,7 @@ func ReadLine(lineNumber int, path string) string { func NameAccumulation(name string, dir string) string { path := filepath.Join(dir, name) if _, err := os.Stat(path); os.IsNotExist(err) { - return path + return name } base := name strings.Split(base, "_")