Commit 9dbe100a by Jonathan Wakely Committed by Jonathan Wakely

PR78111 fix fallback code for filesystem::canonical

	PR libstdc++/78111
	* src/filesystem/ops.cc (canonical): Set error for non-existent path.

From-SVN: r241549
parent d955ae42
2016-10-26 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/78111
* src/filesystem/ops.cc (canonical): Set error for non-existent path.
2016-10-26 Uros Bizjak <ubizjak@gmail.com>
* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Include <limits.h>
......
......@@ -142,7 +142,11 @@ fs::canonical(const path& p, const path& base, error_code& ec)
#endif
if (!exists(pa, ec))
return result;
{
if (!ec)
ec = make_error_code(std::errc::no_such_file_or_directory);
return result;
}
// else: we know there are (currently) no unresolvable symlink loops
result = pa.root_path();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment