diff --git a/src/pkg/layout/package.go b/src/pkg/layout/package.go index 86da207cc3..a9dfb36b97 100644 --- a/src/pkg/layout/package.go +++ b/src/pkg/layout/package.go @@ -217,6 +217,7 @@ func (pp *PackagePaths) Files() map[string]string { stripBase := func(path string) string { rel, _ := filepath.Rel(pp.Base, path) + // Convert from the OS path separator to the standard '/' for Windows support return filepath.ToSlash(rel) } diff --git a/src/pkg/oci/manifest.go b/src/pkg/oci/manifest.go index 1c954bd2c1..dc23f8aee8 100644 --- a/src/pkg/oci/manifest.go +++ b/src/pkg/oci/manifest.go @@ -37,6 +37,7 @@ func NewZarfOCIManifest(manifest *ocispec.Manifest) *ZarfOCIManifest { // Locate returns the descriptor for the first layer with the given path or digest. func (m *ZarfOCIManifest) Locate(pathOrDigest string) ocispec.Descriptor { return helpers.Find(m.Layers, func(layer ocispec.Descriptor) bool { + // Convert from the OS path separator to the standard '/' for Windows support return layer.Annotations[ocispec.AnnotationTitle] == filepath.ToSlash(pathOrDigest) || layer.Digest.Encoded() == pathOrDigest }) }