projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
17296: Merge branch 'master'
[arvados.git]
/
sdk
/
go
/
arvados
/
collection.go
diff --git
a/sdk/go/arvados/collection.go
b/sdk/go/arvados/collection.go
index 030665d77f7a075f289c92d4a715f1d414de9a9b..cec20279d1fdc81cb56936ed731dea6c6a4c0e8c 100644
(file)
--- 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.
// 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 == "" {
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
}
// 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]
// FIXME: shouldn't assume 32 char hash
if i := strings.IndexRune(token[33:], '+'); i >= 0 {
token = token[:33+i]