From 9322acfcb586842090655ace69a58979e59c32a9 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Wed, 18 Oct 2023 15:09:52 +0200 Subject: [PATCH] Fix: Remove path from filename if given fixes #135 Signed-off-by: Knut Ahlers --- cmd/ots-cli/cmd_create.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/ots-cli/cmd_create.go b/cmd/ots-cli/cmd_create.go index bc7e5d9..4d4d40d 100644 --- a/cmd/ots-cli/cmd_create.go +++ b/cmd/ots-cli/cmd_create.go @@ -87,7 +87,7 @@ func createRunE(cmd *cobra.Command, _ []string) (err error) { } secret.Attachments = append(secret.Attachments, client.SecretAttachment{ - Name: f, + Name: path.Base(f), Type: mime.TypeByExtension(path.Ext(f)), Content: content, })