Skip to content
Snippets Groups Projects
Commit 3d902a19 authored by Renzo Frigato's avatar Renzo Frigato
Browse files

remove one folder level in the CAS Storage

parent 6e233328
No related branches found
No related tags found
No related merge requests found
......@@ -90,10 +90,10 @@ def path_from_hash(hash_):
e.g.
hash_ = v0-sha384-01b395a1cbc0f218
will return
0/1/b/3/9/5/a/1/v0-sha384-01b395a1cbc0f218
v0/sha384/01/b3/v0-sha384-01b395a1cbc0f218
"""
hash_version, hash_alg, actual_hash = hash_.split('-')
path = [hash_version, hash_alg] + [actual_hash[2 * i : 2 * i + 2] for i in range(3)]
path = [hash_version, hash_alg] + [actual_hash[2 * i : 2 * i + 2] for i in range(2)]
path.append(hash_)
return os.path.join(*path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment