From 98a84d88e2256ff66953e6cd804e048d68ecc55b Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Fri, 17 Feb 2023 07:15:03 -0800 Subject: [PATCH] fix: trim and ignore './' directories (#16642) --- cmd/untar.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/untar.go b/cmd/untar.go index 143462483..f46a51874 100644 --- a/cmd/untar.go +++ b/cmd/untar.go @@ -203,7 +203,8 @@ func untar(ctx context.Context, r io.Reader, putObject func(reader io.Reader, in } name := header.Name - if name == slashSeparator { + switch path.Clean(name) { + case ".", slashSeparator: continue }