From 8c18f33e2fbef68ac7ea782463f96d8ffd54cf1b Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Thu, 20 Apr 2017 00:31:46 +0200 Subject: ... --- cmd/signify/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/signify/main.go b/cmd/signify/main.go index 137bd67..6ec787b 100644 --- a/cmd/signify/main.go +++ b/cmd/signify/main.go @@ -217,10 +217,10 @@ func NamingScheme(pubFile, secFile string) bool { secFile = filepath.Base(secFile) pubExt := filepath.Ext(pubFile) secExt := filepath.Ext(secFile) - return pubExt == ".pub" && secExt == ".sec" && pubFile[:len(pubExt)] == secFile[:len(secExt)] + return pubExt == ".pub" && secExt == ".sec" && pubFile[:len(pubExt)-1] == secFile[:len(secExt)-1] } func ToPub(secFile string) string { ext := filepath.Ext(secFile) - return filepath.Base(secFile[:len(ext)] + "pub") + return filepath.Base(secFile[:len(ext)-1] + ".pub") } -- cgit v1.2.3