-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: canonicalize load paths in load_from
functions
#1462
base: master
Are you sure you want to change the base?
Conversation
`absolute` resolves the path against `workdir`, `clean` removes extra `..` inside. Using `clean` before `absolute` with paths that go outside of the root (e.g., "/one/two/../../../above_root") can lead to losing levels of `..`
Do you mind resolving these conflicts so we can wrap up this PR? |
IO, | ||
"could not read predicate binary {clean_file_path:?}. Reason: {e}", | ||
), | ||
Err(e) => error!( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be ideal IMO is the following:
read the original path - success - > all good
read the original path -> fails -> clean it up - cleanup successful -> report nice err message
read the original path -> fails -> clean it up -> cleanup fails -> report original err message without mention of the cleanup failing
This helps users by showing an accurate, absolute path in error messages.
Checklist