diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-05-10 12:22:32 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-05-10 12:22:32 +0000 |
commit | f00ba3037cf40b1259eff9093c47a29b0e5ddeb8 (patch) | |
tree | 469f417b9f82882bb1ab87b339da51dd67397c26 /libstdc++-v3/src/filesystem/ops.cc | |
parent | 2b31e16943a9f6403710f94a2e6edecfda5a3409 (diff) |
libstdc++/71037 Add base path to filesystem::canonical exceptions
PR libstdc++/71037
* src/filesystem/ops.cc (canonical(const path&, const path&)): Add
base path to exception.
* testsuite/experimental/filesystem/operations/canonical.cc: Test
paths contained in exception.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236074 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/src/filesystem/ops.cc')
-rw-r--r-- | libstdc++-v3/src/filesystem/ops.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libstdc++-v3/src/filesystem/ops.cc b/libstdc++-v3/src/filesystem/ops.cc index aa26cafa1032..e18c7510c417 100644 --- a/libstdc++-v3/src/filesystem/ops.cc +++ b/libstdc++-v3/src/filesystem/ops.cc @@ -220,8 +220,9 @@ fs::canonical(const path& p, const path& base) { error_code ec; path can = canonical(p, base, ec); - if (ec.value()) - _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot canonicalize", p, ec)); + if (ec) + _GLIBCXX_THROW_OR_ABORT(filesystem_error("cannot canonicalize", p, base, + ec)); return can; } |