diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2016-05-10 16:39:14 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2016-05-10 16:39:14 +0100 |
commit | 6fe673ad0f0fb412f09ddd219eee1b868cfa19d3 (patch) | |
tree | 52d984eb545590c03be855afdd8a9ca3f070dbd6 /libstdc++-v3/src | |
parent | 4b59d19ffdb4857e14328d8d783176b97ccde23e (diff) | |
download | gcc-6fe673ad0f0fb412f09ddd219eee1b868cfa19d3.zip gcc-6fe673ad0f0fb412f09ddd219eee1b868cfa19d3.tar.gz gcc-6fe673ad0f0fb412f09ddd219eee1b868cfa19d3.tar.bz2 |
libstdc++/71038 fix error checks in filesystem::copy_file
PR libstdc++/71038
* src/filesystem/ops.cc (do_copy_file): Fix backwards conditions.
* testsuite/experimental/filesystem/operations/copy_file.cc: New test.
From-SVN: r236084
Diffstat (limited to 'libstdc++-v3/src')
-rw-r--r-- | libstdc++-v3/src/filesystem/ops.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/src/filesystem/ops.cc b/libstdc++-v3/src/filesystem/ops.cc index fab4235..5b82088 100644 --- a/libstdc++-v3/src/filesystem/ops.cc +++ b/libstdc++-v3/src/filesystem/ops.cc @@ -450,7 +450,7 @@ namespace ec = std::make_error_code(std::errc::io_error); return false; } - if (sbout.close() || sbin.close()) + if (!sbout.close() || !sbin.close()) { ec.assign(errno, std::generic_category()); return false; |