Improve panic messages in ApplyTarPatch.

This commit is contained in:
Catherine
2026-02-03 09:51:22 +00:00
parent d3c8db6229
commit e9a5a901ec
+2 -2
View File
@@ -48,9 +48,9 @@ func ApplyTarPatch(manifest *Manifest, reader io.Reader, parents CreateParentsMo
iter := root
for _, segment := range segments[:len(segments)-1] {
if iter.children == nil {
panic("malformed manifest")
panic("malformed manifest (not a directory)")
} else if _, exists := iter.children[segment]; !exists {
panic("malformed manifest")
panic("malformed manifest (node does not exist)")
} else {
iter = iter.children[segment]
}