From d67de687363193de59b7720dd6c1078d938fd4b9 Mon Sep 17 00:00:00 2001 From: surdeus Date: Wed, 23 Nov 2022 12:16:19 +0500 Subject: [PATCH] Ignore filename extension when checking name. --- src/multitool/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/multitool/main.go b/src/multitool/main.go index 8743056..2d8f518 100644 --- a/src/multitool/main.go +++ b/src/multitool/main.go @@ -19,8 +19,9 @@ func Main(name string, m Tools) { utilName string args []string ) - - if binBase := path.Base(os.Args[0]) ; binBase != name { + binBase := path.Base(os.Args[0]) ; + binBase = binBase[:len(binBase)-len(path.Ext(binBase))] + if binBase != name { utilName = binBase args = os.Args[:] } else {