Skip to content

Commit

Permalink
Lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
antoonp committed May 16, 2023
1 parent 675e715 commit 552898b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/grpc/services/ocmshareprovider/ocmshareprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func (s *service) getDataTransferProtocol(ctx context.Context, share *ocm.Share)
path := statRes.GetInfo().Path
err = s.walk(ctx, path, func(path string, info *providerpb.ResourceInfo, err error) error {
if info.Type == providerpb.ResourceType_RESOURCE_TYPE_FILE {
size = size + uint64(info.Size)
size += info.Size
}
return nil
})
Expand All @@ -237,11 +237,11 @@ func (s *service) getDataTransferProtocol(ctx context.Context, share *ocm.Share)
}
return &ocmd.Datatx{
SourceURI: s.webdavURL(ctx, share),
Size: uint64(size),
Size: size,
}
}

// walk traverses the path recursively to discover all resources in the tree
// walk traverses the path recursively to discover all resources in the tree.
func (s *service) walk(ctx context.Context, path string, fn walker.WalkFunc) error {
return s.walker.Walk(ctx, path, fn)
}
Expand Down

0 comments on commit 552898b

Please sign in to comment.