r258375 - in /trunk/libstdc++-v3: ChangeLog src...
redi@gcc.gnu.org
redi@gcc.gnu.org
Fri Mar 9 01:09:00 GMT 2018
Author: redi
Date: Fri Mar 9 01:09:58 2018
New Revision: 258375
URL: https://gcc.gnu.org/viewcvs?rev=258375&root=gcc&view=rev
Log:
Use non-throwing is_directory in filesystem::create_directory
The create_dir helper was calling the throwing form of
filesystem::is_directory instead of passing the error_code argument.
Since std::filesystem::create_directory(const path&, error_code&) is
noexcept, it would call std::terminate if an error occurred in
is_directory.
Passing the error_code also takes care of clearing it in the case where
is_directory returns true.
src/filesystem/ops.cc (create_dir): Pass error_code to is_directory.
src/filesystem/std-ops.cc (create_dir): Likewise.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/src/filesystem/ops.cc
trunk/libstdc++-v3/src/filesystem/std-ops.cc
More information about the Libstdc++-cvs
mailing list