Fix std::filesystem::absolute for empty paths
authorJonathan Wakely <jwakely@redhat.com>
Mon, 21 May 2018 12:52:44 +0000 (13:52 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Mon, 21 May 2018 12:52:44 +0000 (13:52 +0100)
commit8a49324e8a22e47e38656d0a7e2073af186204d6
tree5068c314d6c6bfe307c4e16a72b4cbdbd9b4f026
parentcc343938cbb65881f9a6e3bc019aeff6c5a38137
Fix std::filesystem::absolute for empty paths

* src/filesystem/std-ops.cc (absolute): Report an error for empty
paths.
(weakly_canonical(const path&)): Do not call canonical on empty path.
(weakly_canonical(const path&, error_code&)): Likewise.
* testsuite/27_io/filesystem/operations/absolute.cc: Check for errors.

From-SVN: r260441
libstdc++-v3/ChangeLog
libstdc++-v3/src/filesystem/std-ops.cc
libstdc++-v3/testsuite/27_io/filesystem/operations/absolute.cc