Mercurial > libervia-backend
comparison sat/plugins/plugin_comp_file_sharing.py @ 3363:e3bdfecaf1b0
component file sharing: fix used of `self.files_path` in `_retrieveFiles`
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 17 Sep 2020 21:42:14 +0200 |
parents | 000b6722bd35 |
children | 90aee1f2d07c |
comparison
equal
deleted
inserted
replaced
3362:02583a401e51 | 3363:e3bdfecaf1b0 |
---|---|
548 found_file = found_files[0] | 548 found_file = found_files[0] |
549 if found_file['type'] != C.FILE_TYPE_FILE: | 549 if found_file['type'] != C.FILE_TYPE_FILE: |
550 raise TypeError("a file was expected, type is {type_}".format( | 550 raise TypeError("a file was expected, type is {type_}".format( |
551 type_=found_file['type'])) | 551 type_=found_file['type'])) |
552 file_hash = found_file["file_hash"] | 552 file_hash = found_file["file_hash"] |
553 file_path = os.path.join(self.files_path, file_hash) | 553 file_path = self.files_path / file_hash |
554 file_data["hash_hasher"] = hasher = self._h.getHasher(found_file["hash_algo"]) | 554 file_data["hash_hasher"] = hasher = self._h.getHasher(found_file["hash_algo"]) |
555 size = file_data["size"] = found_file["size"] | 555 size = file_data["size"] = found_file["size"] |
556 file_data["file_hash"] = file_hash | 556 file_data["file_hash"] = file_hash |
557 file_data["hash_algo"] = found_file["hash_algo"] | 557 file_data["hash_algo"] = found_file["hash_algo"] |
558 | 558 |