... |
... |
@@ -111,7 +111,7 @@ def upload_file(context, file_path, verify): |
111
|
111
|
help="Check uploaded directory's integrity.")
|
112
|
112
|
@pass_context
|
113
|
113
|
def upload_directory(context, directory_path, verify):
|
114
|
|
- sent_digests, nodes_map = [], {}
|
|
114
|
+ sent_digests = []
|
115
|
115
|
with upload(context.channel, instance=context.instance_name) as uploader:
|
116
|
116
|
for node, blob, path in merkle_tree_maker(directory_path):
|
117
|
117
|
if not os.path.isabs(path):
|
... |
... |
@@ -119,12 +119,9 @@ def upload_directory(context, directory_path, verify): |
119
|
119
|
click.echo("Queueing path=[{}]".format(path))
|
120
|
120
|
|
121
|
121
|
node_digest = uploader.put_blob(blob, digest=node.digest, queue=True)
|
|
122
|
+ sent_digests.append((node_digest, path))
|
122
|
123
|
|
123
|
|
- nodes_map[node.digest.hash] = path
|
124
|
|
- sent_digests.append(node_digest)
|
125
|
|
-
|
126
|
|
- for node_digest in sent_digests:
|
127
|
|
- node_path = nodes_map[node_digest.hash]
|
|
124
|
+ for node_digest, node_path in sent_digests:
|
128
|
125
|
if not os.path.isabs(directory_path):
|
129
|
126
|
node_path = os.path.relpath(node_path)
|
130
|
127
|
if verify and (os.path.isfile(node_path) and
|