X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/5420797c32e73347a79b5ecd8cdfbd212fd8aae8..9cfbcdf804974812b1a4ec514f5dc7902fce6137:/apps/workbench/app/models/collection.rb diff --git a/apps/workbench/app/models/collection.rb b/apps/workbench/app/models/collection.rb index 6bc55bde3d..5460e9a6e0 100644 --- a/apps/workbench/app/models/collection.rb +++ b/apps/workbench/app/models/collection.rb @@ -1,5 +1,12 @@ class Collection < ArvadosBase + MD5_EMPTY = 'd41d8cd98f00b204e9800998ecf8427e' + + # Return true if the given string is the locator of a zero-length blob + def self.is_empty_blob_locator? locator + !!locator.to_s.match("^#{MD5_EMPTY}(\\+.*)?\$") + end + def total_bytes if files tot = 0