CFE-4040: Added a user error on add from a URL of an unsupported scheme, and fixed crash on attempting to add a non-URL archive file#239
Merged
Conversation
Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
…xed crash on attempting to add a non-URL archive file Signed-off-by: jakub-nt <175944085+jakub-nt@users.noreply.github.com>
larsewi
approved these changes
Jun 26, 2025
| if to_add[0].endswith(SUPPORTED_ARCHIVES) or to_add[0].startswith( | ||
| SUPPORTED_URI_SCHEMES | ||
| ): | ||
| if to_add[0].startswith(SUPPORTED_URI_SCHEMES): |
Contributor
There was a problem hiding this comment.
Should not the check to see if it ends with one of the SUPPORTED_ARCHIVES still be here?
Contributor
Author
There was a problem hiding this comment.
If to_add[0].endswith(SUPPORTED_ARCHIVES) is true then either to_add[0].startswith(SUPPORTED_URI_SCHEMES) is true and nothing has changed, or it's false and to_add[0] isn't a supported URL and the subsequent code has no capability to add a local archive file. Actually neither _add_using_url nor _add_modules have such capability, and it seems adding local archive files has simply never been supported (we could consider supporting it as a local version of adding an archive file by URL in the future).
olehermanse
approved these changes
Jun 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.