diff --git a/ndn_hydra/repo/handles/insert_command_handle.py b/ndn_hydra/repo/handles/insert_command_handle.py index 6fb1113..8288efb 100644 --- a/ndn_hydra/repo/handles/insert_command_handle.py +++ b/ndn_hydra/repo/handles/insert_command_handle.py @@ -153,7 +153,7 @@ async def _process_insert(self, cmd: InsertCommand): add_message.node_name = self.config['node_name'].encode() add_message.favor = str(favor).encode() add_message.file = File() - add_message.file.file_name = cmd.file.file_name[-2:] + add_message.file.file_name = cmd.file.file_name add_message.file.packets = packets add_message.file.packet_size = packet_size add_message.file.size = size diff --git a/ndn_hydra/repo/handles/read_handle.py b/ndn_hydra/repo/handles/read_handle.py index 89249c3..4611365 100644 --- a/ndn_hydra/repo/handles/read_handle.py +++ b/ndn_hydra/repo/handles/read_handle.py @@ -78,7 +78,7 @@ def _on_interest(self, int_name, int_param, _app_param): best_id = self._best_id_for_file(file_name) segment_comp = "/" + Component.to_str(int_name[-1]) - if int_param.must_be_fresh and segment_comp != "/seg=0": + if int_param.must_be_fresh: return if best_id is None: