From d6099a7ec54e426f14aec85a0be1382e5e44fc3d Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Wed, 13 Nov 2024 15:34:57 +0100 Subject: [PATCH] revert some changes which should not be related to the PR --- lib/galaxy/tools/parameters/dynamic_options.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/galaxy/tools/parameters/dynamic_options.py b/lib/galaxy/tools/parameters/dynamic_options.py index 75c4b3662668..592dbd9cf575 100644 --- a/lib/galaxy/tools/parameters/dynamic_options.py +++ b/lib/galaxy/tools/parameters/dynamic_options.py @@ -656,18 +656,14 @@ def load_from_parameter(from_parameter, transform_lines=None): self.parse_column_definitions(elem) if data_file is not None: data_file = data_file.strip() - full_path = os.path.join(self.tool_param.tool.app.config.tool_data_path, data_file) - full_path = os.path.normpath(full_path) - if safe_contains(self.tool_param.tool.app.config.tool_data_path, full_path): + if not os.path.isabs(data_file): + full_path = os.path.join(self.tool_param.tool.app.config.tool_data_path, data_file) if os.path.exists(full_path): self.index_file = data_file with open(full_path) as fh: self.file_fields = self.parse_file_fields(fh) else: self.missing_index_file = data_file - else: - log.error(f"'from_file' ({data_file}) references path outside of Galaxy's tool-data dir!") - self.missing_index_file = data_file elif dataset_file is not None: self.meta_file_key = elem.get("meta_file_key", None) self.dataset_ref_name = dataset_file