fix subdirectory missing in support bundle issue (#308)

This commit is contained in:
Salah Aldeen Al Saleh
2020-12-08 12:52:29 -08:00
committed by GitHub
parent 2e16424b44
commit b05eb6bf75

View File

@@ -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")
}