id summary reporter owner description type status milestone component version severity resolution keywords cc 6932 create_directories throws exception even if error_code is specified xuefer@… Beman Dawes "code {{{ boost::system::error_code errorCode; fs::create_directories(backupDirectory, errorCode); }}} error {{{ Unhandled exception at 0x75c5b9bc in UsbPhoneWD.exe: Microsoft C++ exception: boost::filesystem3::filesystem_error at memory location 0x0257b6d0.. }}} backtrace {{{ > a.exe!`anonymous namespace'::process_status_failure(const boost::filesystem3::path & p, boost::system::error_code * ec) Line 623 + 0x4b bytes C++ a.exe!boost::filesystem3::detail::status(const boost::filesystem3::path & p, boost::system::error_code * ec) Line 1627 + 0x11 bytes C++ a.exe!boost::filesystem3::exists(const boost::filesystem3::path & p) Line 289 + 0x30 bytes C++ a.exe!boost::filesystem3::detail::create_directories(const boost::filesystem3::path & p, boost::system::error_code * ec) Line 927 + 0x18 bytes C++ a.exe!boost::filesystem3::create_directories(const boost::filesystem3::path & p, boost::system::error_code & ec) Line 403 + 0x2b bytes C++ }}} boost::filesystem3::detail::create_directories Line 927 {{{ BOOST_FILESYSTEM_DECL bool create_directories(const path& p, system::error_code* ec) { if (p.empty() || exists(p)) <- this is Line 927 { if (!p.empty() && !is_directory(p)) { if (ec == 0) BOOST_FILESYSTEM_THROW(filesystem_error( ""boost::filesystem::create_directories"", p, error_code(system::errc::file_exists, system::generic_category()))); else ec->assign(system::errc::file_exists, system::generic_category()); } return false; } // First create branch, by calling ourself recursively create_directories(p.parent_path(), ec); // Now that parent's path exists, create the directory create_directory(p, ec); return true; } }}} maybe ""error_code dummy"" should be pass to exists() and is_directory() to avoid throwing exception, just like create_directory do" Bugs closed To Be Determined filesystem Boost 1.49.0 Problem fixed