Open bubnikv opened 2 years ago
@bubnikv This appears to be an issue in your specific use-case. Changing the library's behavior to fix it might not be the right choice. Have you tried reading the file, applying the necessary filtration, and then passing an std::string to the parser?
We are facing a weird issue on Windows, where a file move operation is not atomic: It seems to copy the file and sometimes it produces files that start normally, but then end filled with NULL characters. It looks as if a buffer was prepared, possibly memory mapped and then never filled.
Unfortunately the property_tree ini parser parses such files in many cases. Would it be possible to throw an exception on NULL characters, possibly as an option? Other characters below ASCII 32 excluding CR, LF, TAB may possibly be refused as well.