Fix LWG2683 - filesystem::copy() should always clear the user-provided error_code

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283951 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2016-10-11 22:18:09 +00:00
parent a75b75f514
commit 508f208ae9
3 changed files with 31 additions and 13 deletions

View File

@@ -236,12 +236,8 @@ void __copy(const path& from, const path& to, copy_options options,
}
return;
}
else if (is_directory(f)) {
if (not bool(copy_options::recursive & options) &&
bool(copy_options::__in_recursive_copy & options))
{
return;
}
else if (is_directory(f) && (bool(copy_options::recursive & options) ||
copy_options::none == options)) {
if (!exists(t)) {
// create directory to with attributes from 'from'.