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 Oct 9, 2020
1 parent 6612d7c commit a175914
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 @@ -601,6 +601,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{}
closure := func(ctx context.Context) error {
Expand Down

0 comments on commit a175914

Please sign in to comment.