Skip to content

Commit b05eb6b

Browse files
author
Salah Aldeen Al Saleh
authored
fix subdirectory missing in support bundle issue (#308)
1 parent 2e16424 commit b05eb6b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/troubleshoot/cli/run.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,8 @@ func tarSupportBundleDir(inputDir, outputFilename string) error {
691691
return nil
692692
}
693693

694-
nameInArchive, err := filepath.Rel(inputDir, filename)
694+
parentDirName := filepath.Dir(inputDir) // this is to have the files inside a subdirectory
695+
nameInArchive, err := filepath.Rel(parentDirName, filename)
695696
if err != nil {
696697
return errors.Wrap(err, "failed to create relative file name")
697698
}

0 commit comments

Comments
 (0)