projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename owned_items to contents, remove user method, update docs.
[arvados.git]
/
apps
/
workbench
/
app
/
models
/
collection.rb
diff --git
a/apps/workbench/app/models/collection.rb
b/apps/workbench/app/models/collection.rb
index 6bc55bde3d21199fda4c31fa3143800d9b03c026..5460e9a6e01641192b2ee0c9c0c12d9773e293e3 100644
(file)
--- a/
apps/workbench/app/models/collection.rb
+++ b/
apps/workbench/app/models/collection.rb
@@
-1,5
+1,12
@@
class Collection < ArvadosBase
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
def total_bytes
if files
tot = 0