Skip to content

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

Description

@firewave

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions