From d124cd8ecebffaf58cc6cd899e04485fe04a2834 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Fri, 4 Sep 2015 14:14:59 +0900 Subject: [PATCH] WIP --- util.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/util.go b/util.go index 2d3a55e..6172cbd 100644 --- a/util.go +++ b/util.go @@ -48,14 +48,9 @@ func makeAbsPath(path string) string { } func makeVariantNames(name, variant string) []string { - if strings.HasSuffix(name, "__") { - name = strings.TrimSuffix(name, "__") - variant = "" - } - - names := []string{name} - if len(variant) > 0 { - names = []string{fmt.Sprint(name, "__", variant), name} + names := []string{name, strings.TrimSuffix(name, "__")} + if len(variant) > 0 && !strings.HasSuffix(name, "__") { + names = []string{fmt.Sprint(name, "__", variant), name, strings.TrimSuffix(name, "__")} } return names