id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5670,Construction from a character array leads to path with an embedded zero terminator,davidjward30@…,Beman Dawes,"Boost filesystem v3. Demonstrated with an example: wchar_t filename[256]; filename[0]=L'D'; filename[1]=0; std::wstring s(filename); std::cout << ""Length of s: "" << s.length() << "" "" << std::endl; boost::filesystem::path p2(filename); std::cout << ""Length of p: "" << p2.native().length() << std::endl; Displays: Length of s: 1 Length of p: 255 When initializing a std::wstring with a character array, the embedded zero terminator is taken in to account. However, with filesystem::path, the resulting path ends up longer than expected with an embedded zero terminator. I would expect length of p to be 1 with the path ending at the first zero terminator. This bug leads to all sorts of hard to find bugs as many operations seem to work fine, but calling path::filename() results in an empty string. An obvious workaround is to do: boost::filesystem::path p2(&filename[0]); ",Bugs,closed,To Be Determined,filesystem,Boost 1.44.0,Regression,duplicate,constructor character array,