id summary reporter owner description type status milestone component version severity resolution keywords cc 10388 null character at end of string from filesystem::temp_directory_path anonymous Beman Dawes "The null character at end of string causes very interesting bugs that are hard to debug. Workaround we learned to use is .c_str(): filesystem::path temp_path = filesystem::temp_directory_path( ec ).c_str(); Cause of bug: GetTempPathW(0, 0) returns the size of buffer enought to contain the path, but is might be bigger than (path length + 1). (It rarely happens, but happens.) However the function filesystem::temp_directory_path expects it to be exactly (path length + 1). Solution: replace lines buf.pop_back(); path p(buf.begin(), buf.end()); with path p(buf.begin());" Bugs closed To Be Determined filesystem Boost 1.57.0 Problem fixed