Unify analysis product path identity

This commit is contained in:
2026-11-30 04:02:53 +00:00
parent dbfcfa3f75
commit 3795d86587
11 changed files with 135 additions and 11 deletions

View File

@@ -253,7 +253,11 @@ func restoreProductRelativePath(cfg *config.Config, m *manifest.Manifest, destin
return "", err
}
if entry, ok := catalog.Lookup(source); ok {
result = filepath.ToSlash(entry.CanonicalRelPath)
relative, err := artifacts.ProductRelativePath(destinationRoot, entry.CanonicalRelPath)
if err != nil {
return "", err
}
result = relative
parts := strings.Split(result, "/")
if len(parts) != 2 || (parts[0] != config.PathArtifactsDirSegment && parts[0] != config.PathTranscriptsSegment) || parts[1] == "" || parts[1] == "." || parts[1] == ".." {
return "", fmt.Errorf("configured product path %q is not flat", result)