diff --git a/lib/galaxy/tool_util/verify/interactor.py b/lib/galaxy/tool_util/verify/interactor.py index b51e2a33ad5a..08525860a000 100644 --- a/lib/galaxy/tool_util/verify/interactor.py +++ b/lib/galaxy/tool_util/verify/interactor.py @@ -560,7 +560,7 @@ def stage_data_async( file_name = None file_name_exists = False location = self._ensure_valid_location_in(test_data) - if fname: + if fname and force_path_paste: file_name = self.test_data_path(tool_id, fname, tool_version=tool_version) file_name_exists = os.path.exists(f"{file_name}") upload_from_location = not file_name_exists and location is not None @@ -575,7 +575,8 @@ def stage_data_async( if upload_from_location: tool_input.update({"files_0|url_paste": location}) elif force_path_paste: - file_name = self.test_data_path(tool_id, fname, tool_version=tool_version) + if file_name is None: + file_name = self.test_data_path(tool_id, fname, tool_version=tool_version) tool_input.update({"files_0|url_paste": f"file://{file_name}"}) else: file_content = self.test_data_download(tool_id, fname, is_output=False, tool_version=tool_version)