fix(classify): treat .tgz as .tar.gz, not as meta asset

.tgz is a legitimate archive format (used by ollama darwin releases).
Remove it from the meta-asset filter and add a .tgz → .tar.gz mapping
in detectFormat.
This commit is contained in:
AJ ONeal
2026-03-10 10:10:07 -06:00
parent 8aeda55e3b
commit 3965e993f5

View File

@@ -1249,7 +1249,6 @@ func isMetaAsset(name string) bool {
".sbom", ".spdx", ".json.sig", ".sigstore",
"_src.tar.gz", "_src.tar.xz", "_src.zip",
".d.ts", // TypeScript definitions
".tgz", // npm packages (not binary distributables)
".pub", // cosign/SSH public keys
} {
if strings.HasSuffix(lower, suffix) {
@@ -1285,6 +1284,10 @@ func detectFormat(name string) string {
return ext
}
}
// .tgz is a common alias for .tar.gz (used by ollama, npm, etc.)
if strings.HasSuffix(lower, ".tgz") {
return ".tar.gz"
}
ext := filepath.Ext(lower)
return ext // includes leading dot, or "" if none
}