Skip to content
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

New cfe_locate_implementation_file() includes fallback file in results even if override found #2311

Closed
jphickey opened this issue Apr 27, 2023 · 0 comments · Fixed by #2312
Closed

Comments

@jphickey
Copy link
Contributor

Describe the bug
When using a "FALLBACK_FILE" option, this is put at the last priority
When using the "ALLOW_LIST" option, this function returns ALL files found that match the pattern being searched for.

When those two options are used together, it means that the fallback file will be included in the result list, along with the user-supplied files. This is not the intent; the fallback file should only be returned if no user-supplied files were found.

The result of including both is that one gets duplicate defs and/or unexpected values.

The "generate_include_configfile()" uses it in this way, and thus gets both copies.

To Reproduce
Use "generate_config_includefile" with a file that has been overridden by the user. The generated include file will get both the default and the user-supplied copy.

Expected behavior
Only the user-supplied copy should be used.

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey added the bug label Apr 27, 2023
jphickey added a commit to jphickey/cFE that referenced this issue Apr 27, 2023
Only include the "FALLBACK_FILE" if the normal search came up empty.
Do not return a list containing the fallback/default along with the
user-supplied files, only return the user-supplied files.  This was an
issue when using "ALLOW_LIST" in that it had both.
dzbaker added a commit that referenced this issue Apr 28, 2023
@dmknutsen dmknutsen added this to the Equuleus milestone May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants