diff --git a/src/pkg/cluster/injector.go b/src/pkg/cluster/injector.go index eda12cd24b..6e6994add8 100644 --- a/src/pkg/cluster/injector.go +++ b/src/pkg/cluster/injector.go @@ -436,8 +436,6 @@ func (c *Cluster) getImagesAndNodesForInjection(timeoutDuration time.Duration) ( result := make(imageNodeMap) for { - // Delay check 2 seconds - time.Sleep(2 * time.Second) select { // On timeout abort @@ -493,6 +491,7 @@ func (c *Cluster) getImagesAndNodesForInjection(timeoutDuration time.Duration) ( if len(result) < 1 { c.Log("no images found: %w") + time.Sleep(2 * time.Second) } else { return result, nil } diff --git a/src/pkg/utils/io.go b/src/pkg/utils/io.go index 53bbeaa3eb..7bda78ff7f 100755 --- a/src/pkg/utils/io.go +++ b/src/pkg/utils/io.go @@ -611,7 +611,9 @@ func CreateReproducibleTarballFromDir(dirPath, dirPrefix, tarballPath string) er if err != nil { return fmt.Errorf("error getting relative path: %w", err) } - header.Name = filepath.Join(dirPrefix, name) + name = filepath.Join(dirPrefix, name) + name = filepath.ToSlash(name) + header.Name = name // Write the header to the tarball if err := tw.WriteHeader(header); err != nil {