diff options
Diffstat (limited to 'tvix/store/protos')
-rw-r--r-- | tvix/store/protos/pathinfo.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tvix/store/protos/pathinfo.go b/tvix/store/protos/pathinfo.go index 6607b5c879fb..595a1b4fab72 100644 --- a/tvix/store/protos/pathinfo.go +++ b/tvix/store/protos/pathinfo.go @@ -51,7 +51,9 @@ func (p *PathInfo) Validate() (*storepath.StorePath, error) { return nil, fmt.Errorf("root node must be set") } - // ensure it properly parses to a store path, and in case it refers to a digest, ensure it has the right length. + // for all three node types, ensure the name properly parses to a store path, + // and in case it refers to a digest, ensure it has the right length. + if node := rootNode.GetDirectory(); node != nil { if len(node.Digest) != 32 { return nil, fmt.Errorf("invalid digest size for %s, expected %d, got %d", node.Name, 32, len(node.Digest)) |