Implement LWG 2681 and 2682

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284316 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2016-10-16 00:29:22 +00:00
parent 8bbf53fc93
commit 451f34db16
3 changed files with 48 additions and 4 deletions

View File

@@ -236,6 +236,9 @@ void __copy(const path& from, const path& to, copy_options options,
}
return;
}
else if (is_directory(f) && bool(copy_options::create_symlinks & options)) {
return set_or_throw(make_error_code(errc::is_a_directory), ec, "copy");
}
else if (is_directory(f) && (bool(copy_options::recursive & options) ||
copy_options::none == options)) {