simplecpp icon indicating copy to clipboard operation
simplecpp copied to clipboard

fixed #342/fixed #343 - do not treat directories like regular files in existence checks

Open firewave opened this issue 1 year ago • 3 comments

std::ifstream can open directories and read from them without issue. Nothing will be read though - it is like an empty file. This would have treated an include which actually pointed to a directory as existing (e.g. #include </>).

firewave avatar Feb 15 '24 19:02 firewave

No tests added since we still do not have tests for additional files ... but I just realized that certain directories always exists so at least on Linux it can be tested.

Moving code is problematic though as Cppcheck is GPL and this would re-license it under 0BSD.

firewave avatar Feb 15 '24 19:02 firewave

Moving code is problematic though as Cppcheck is GPL and this would re-license it under 0BSD.

@danmar

After we resolved and merged this we should create another release so we can sync it to Cppcheck.

firewave avatar May 24 '24 06:05 firewave

The helper functions need to be adjusted so they align with the current usage in Cppcheck.

firewave avatar Aug 15 '25 13:08 firewave