Skip to content

Commit

Permalink
Optimise it out of GetDirectoryTree too
Browse files Browse the repository at this point in the history
  • Loading branch information
peterebden committed Sep 22, 2020
1 parent 26b1e93 commit 191e9de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/pkg/client/cas.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ func (c *Client) ResourceNameWrite(hash string, sizeBytes int64) string {
// GetDirectoryTree returns the entire directory tree rooted at the given digest (which must target
// a Directory stored in the CAS).
func (c *Client) GetDirectoryTree(ctx context.Context, d *repb.Digest) (result []*repb.Directory, err error) {
if d.SizeBytes == 0 && d.Hash == digest.Empty.Hash {
return nil, nil
}
pageTok := ""
result = []*repb.Directory{}
opts := c.RPCOpts()
Expand Down

0 comments on commit 191e9de

Please sign in to comment.