X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1e3eacb0ca6f2228f50f13514c7577a149a707e6..64c516079154f73da3f2a33a957fa8ae8eb23749:/sdk/go/arvados/collection.go diff --git a/sdk/go/arvados/collection.go b/sdk/go/arvados/collection.go index 030665d77f..cec20279d1 100644 --- a/sdk/go/arvados/collection.go +++ b/sdk/go/arvados/collection.go @@ -53,6 +53,8 @@ func (c Collection) resourceName() string { // SizedDigests returns the hash+size part of each data block // referenced by the collection. +// +// Zero-length blocks are not included. func (c *Collection) SizedDigests() ([]SizedDigest, error) { manifestText := c.ManifestText if manifestText == "" { @@ -76,6 +78,10 @@ func (c *Collection) SizedDigests() ([]SizedDigest, error) { // FIXME: ensure it's a file token break } + if strings.HasPrefix(token, "d41d8cd98f00b204e9800998ecf8427e+0") { + // Exclude "empty block" placeholder + continue + } // FIXME: shouldn't assume 32 char hash if i := strings.IndexRune(token[33:], '+'); i >= 0 { token = token[:33+i]