id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 10731,make_permissions is case-inconsistent and requires unnecessary conversions,daniel.kruegler@…,Beman Dawes,"There exist two notable issues with the internal function make_permissions in operations.cpp (Windows only): a) The usage of the macro BOOST_FILESYSTEM_STRICMP implies case-insensitive comparison, but for compilers different from _MSC_VER it actually calls the case-sensitive function std::strcmp. b) The code uses up to four code-conversions (wchar_t->char) to invoke the comparison function, all of the following form: {{{ BOOST_FILESYSTEM_STRICMP(p.extension().string().c_str(), "".exe"") }}} It seems that there exist a simple and consistent way to solve these problems: Replace the macro BOOST_FILESYSTEM_STRICMP by boost::algorithm::iequals and do not perform code conversion. Essentially the make_permissions code could be changed to the following form - assuming an additional inclusion of {{{ #include ""boost/algorithm/string/predicate.hpp"" }}} and removal of the BOOST_FILESYSTEM_STRICMP macro definition (which is no-where else used): {{{ perms make_permissions(const path& p, DWORD attr) { perms prms = fs::owner_read | fs::group_read | fs::others_read; if ((attr & FILE_ATTRIBUTE_READONLY) == 0) prms |= fs::owner_write | fs::group_write | fs::others_write; if (boost::algorithm::iequals(p.extension().c_str(), L"".exe"") || boost::algorithm::iequals(p.extension().c_str(), L"".com"") || boost::algorithm::iequals(p.extension().c_str(), L"".bat"") || boost::algorithm::iequals(p.extension().c_str(), L"".cmd"")) prms |= fs::owner_exe | fs::group_exe | fs::others_exe; return prms; } }}} Given that boost::algorithm::iequals allows to provide a std::locale object as additional argument, one could improve that solution even more by providing the same locale as that from path_locale() within path.cpp. Unfortunately there is no access within operations.cpp to that function (which is within an unnamed namespace), so realizing this second improvement would require a larger surgery. ",Bugs,new,To Be Determined,filesystem,Boost 1.56.0,Problem,,,raad@…