X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c5f67bbc40e8f6a98854b1bf67fc6a98cff80790..97d0e12a78e9245c8ed29c070ffe0399e5cd6cb4:/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]