summaryrefslogtreecommitdiffstats
path: root/libcxx/src/experimental/filesystem
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-10-11 22:18:09 +0000
committerEric Fiselier <eric@efcs.ca>2016-10-11 22:18:09 +0000
commite6364a35fd37177e6a628e4353e8af229d95d83d (patch)
treebefe15464fbaf8d765cb48cef66db4d67bf5e904 /libcxx/src/experimental/filesystem
parentf4bab7eb66821af7030fe3e8c2d2ce73f07eac64 (diff)
downloadbcm5719-llvm-e6364a35fd37177e6a628e4353e8af229d95d83d.tar.gz
bcm5719-llvm-e6364a35fd37177e6a628e4353e8af229d95d83d.zip
Fix LWG2683 - filesystem::copy() should always clear the user-provided error_code
llvm-svn: 283951
Diffstat (limited to 'libcxx/src/experimental/filesystem')
-rw-r--r--libcxx/src/experimental/filesystem/operations.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/libcxx/src/experimental/filesystem/operations.cpp b/libcxx/src/experimental/filesystem/operations.cpp
index 0420e12e3be..5d0a9a9dd30 100644
--- a/libcxx/src/experimental/filesystem/operations.cpp
+++ b/libcxx/src/experimental/filesystem/operations.cpp
@@ -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'.
OpenPOWER on IntegriCloud