Skip to content
Snippets Groups Projects
Unverified Commit df147e2e authored by Ken Matsui's avatar Ken Matsui
Browse files

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: default avatarKen Matsui <kmatsui@gcc.gnu.org>
Reviewed-by: default avatarJonathan Wakely <jwakely@redhat.com>
parent ea2a9c76
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment