Unify analysis product path identity
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user