From efd3c8d0b41487d973195bbfa722d468fac0b076 Mon Sep 17 00:00:00 2001 From: Goffi Date: Wed, 14 Mar 2018 08:08:42 +0100 Subject: [PATCH] component file sharing: fixed hash handling (key has been renamed to "file_hash") --- src/plugins/plugin_comp_file_sharing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/plugin_comp_file_sharing.py b/src/plugins/plugin_comp_file_sharing.py index 4b29d355..d393678e 100755 --- a/src/plugins/plugin_comp_file_sharing.py +++ b/src/plugins/plugin_comp_file_sharing.py @@ -140,7 +140,7 @@ class FileSharing(object): 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 @@ class FileSharing(object): # 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']