# HG changeset patch # User Goffi # Date 1521011322 -3600 # Node ID 353880a5c363eeeb74b7d9f2cc54aca6cd386bfa # Parent e4de2f16a284807b50f1166020717240d8d9d8d4 component file sharing: fixed hash handling (key has been renamed to "file_hash") diff -r e4de2f16a284 -r 353880a5c363 src/plugins/plugin_comp_file_sharing.py --- a/src/plugins/plugin_comp_file_sharing.py Wed Mar 14 08:07:24 2018 +0100 +++ b/src/plugins/plugin_comp_file_sharing.py Wed Mar 14 08:08:42 2018 +0100 @@ -140,7 +140,7 @@ found_files = yield self.host.memory.getFiles(client, peer_jid=peer_jid, 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'), path=file_data.get(u'path'), namespace=file_data.get(u'namespace')) @@ -157,7 +157,7 @@ # we only use the first found file 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_data[u'hash_hasher'] = hasher = self._h.getHasher(found_file[u'hash_algo']) size = file_data[u'size'] = found_file[u'size']