From b05eb6bf75f85daeec66fb88d4b6ae3ef7165bef Mon Sep 17 00:00:00 2001 From: Salah Aldeen Al Saleh Date: Tue, 8 Dec 2020 12:52:29 -0800 Subject: [PATCH] fix subdirectory missing in support bundle issue (#308) --- cmd/troubleshoot/cli/run.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/troubleshoot/cli/run.go b/cmd/troubleshoot/cli/run.go index 04d7c23f..6dba2485 100644 --- a/cmd/troubleshoot/cli/run.go +++ b/cmd/troubleshoot/cli/run.go @@ -691,7 +691,8 @@ func tarSupportBundleDir(inputDir, outputFilename string) error { return nil } - nameInArchive, err := filepath.Rel(inputDir, filename) + parentDirName := filepath.Dir(inputDir) // this is to have the files inside a subdirectory + nameInArchive, err := filepath.Rel(parentDirName, filename) if err != nil { return errors.Wrap(err, "failed to create relative file name") }