Skip to content

Commit

Permalink
revert some changes
Browse files Browse the repository at this point in the history
which should not be related to the PR
  • Loading branch information
bernt-matthias committed Nov 13, 2024
1 parent d206795 commit d6099a7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/galaxy/tools/parameters/dynamic_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d6099a7

Please sign in to comment.