libstdc++: Fix error handling in filesystem::equivalent [PR113250]
This patch made std::filesystem::equivalent correctly throw an exception when either path does not exist as per [fs.op.equivalent]/4. PR libstdc++/113250 libstdc++-v3/ChangeLog: * src/c++17/fs_ops.cc (fs::equivalent): Use || instead of &&. * src/filesystem/ops.cc (fs::equivalent): Likewise. * testsuite/27_io/filesystem/operations/equivalent.cc: Handle error codes. * testsuite/experimental/filesystem/operations/equivalent.cc: Likewise. Signed-off-by:Ken Matsui <kmatsui@gcc.gnu.org> Reviewed-by:
Jonathan Wakely <jwakely@redhat.com>
Showing
- libstdc++-v3/src/c++17/fs_ops.cc 1 addition, 1 deletionlibstdc++-v3/src/c++17/fs_ops.cc
- libstdc++-v3/src/filesystem/ops.cc 1 addition, 1 deletionlibstdc++-v3/src/filesystem/ops.cc
- libstdc++-v3/testsuite/27_io/filesystem/operations/equivalent.cc 2 additions, 2 deletions...++-v3/testsuite/27_io/filesystem/operations/equivalent.cc
- libstdc++-v3/testsuite/experimental/filesystem/operations/equivalent.cc 2 additions, 2 deletions...estsuite/experimental/filesystem/operations/equivalent.cc
Loading
Please register or sign in to comment