From 14d8d80b86168947c42de806418bc3801ad2fcf7 Mon Sep 17 00:00:00 2001 From: yanjingtu Date: Wed, 30 Aug 2023 12:09:10 +0800 Subject: [PATCH] fix when prefix has '/' and prefix is not end with '/' (#684) --- pkg/command/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/command/options.go b/pkg/command/options.go index 5d87cbe..6edb43b 100644 --- a/pkg/command/options.go +++ b/pkg/command/options.go @@ -135,7 +135,7 @@ func ParseOptions(args []string) (Options, error) { opts.SSLMode = "" } - if opts.Prefix != "" && !strings.Contains(opts.Prefix, "/") { + if opts.Prefix != "" && !strings.HasSuffix(opts.Prefix, "/") { opts.Prefix = opts.Prefix + "/" }