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

#include pointing to directory is treated as existing empty file #343

Open
firewave opened this issue Feb 22, 2024 · 0 comments
Open

#include pointing to directory is treated as existing empty file #343

firewave opened this issue Feb 22, 2024 · 0 comments
Assignees
Labels

Comments

@firewave
Copy link
Collaborator

If an include points to an existing directory (e.g. #include </>) the code will not raise an error. I would expect it to report EXPLICIT_INCLUDE_NOT_FOUND.

This is caused by using std::ifstream::is_open() to determine the existence of a file. But if you do this on a directory it will be successful as well as the subsequent read. It will not read anything though so it behaves like an empty file.

@firewave firewave self-assigned this Oct 5, 2024
@firewave firewave added the bug label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant