component file sharing: fixed hash handling (key has been renamed to "file_hash")
This commit is contained in:
parent
d4ed57dadc
commit
efd3c8d0b4
1 changed files with 2 additions and 2 deletions
|
|
@ -140,7 +140,7 @@ class FileSharing(object):
|
||||||
found_files = yield self.host.memory.getFiles(client,
|
found_files = yield self.host.memory.getFiles(client,
|
||||||
peer_jid=peer_jid,
|
peer_jid=peer_jid,
|
||||||
name=file_data.get(u'name'),
|
name=file_data.get(u'name'),
|
||||||
file_hash=file_data.get(u'hash'),
|
file_hash=file_data.get(u'file_hash'),
|
||||||
hash_algo=file_data.get(u'hash_algo'),
|
hash_algo=file_data.get(u'hash_algo'),
|
||||||
path=file_data.get(u'path'),
|
path=file_data.get(u'path'),
|
||||||
namespace=file_data.get(u'namespace'))
|
namespace=file_data.get(u'namespace'))
|
||||||
|
|
@ -157,7 +157,7 @@ class FileSharing(object):
|
||||||
|
|
||||||
# we only use the first found file
|
# we only use the first found file
|
||||||
found_file = found_files[0]
|
found_file = found_files[0]
|
||||||
file_hash = found_file[u'hash']
|
file_hash = found_file[u'file_hash']
|
||||||
file_path = os.path.join(self.files_path, file_hash)
|
file_path = os.path.join(self.files_path, file_hash)
|
||||||
file_data[u'hash_hasher'] = hasher = self._h.getHasher(found_file[u'hash_algo'])
|
file_data[u'hash_hasher'] = hasher = self._h.getHasher(found_file[u'hash_algo'])
|
||||||
size = file_data[u'size'] = found_file[u'size']
|
size = file_data[u'size'] = found_file[u'size']
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue