Message ID | 20190516225211.GA28194@redhat.com |
---|---|
State | New |
Headers | show |
Series | Remove incorrect assertion from filesystem::absolute | expand |
diff --git a/libstdc++-v3/src/c++17/fs_ops.cc b/libstdc++-v3/src/c++17/fs_ops.cc index 2d13b172d69..274ee7f0834 100644 --- a/libstdc++-v3/src/c++17/fs_ops.cc +++ b/libstdc++-v3/src/c++17/fs_ops.cc @@ -96,6 +96,7 @@ fs::absolute(const path& p, error_code& ec) } #ifdef _GLIBCXX_FILESYSTEM_IS_WINDOWS + // s must remain null-terminated wstring_view s = p.native(); if (p.has_root_directory()) // implies !p.has_root_name() @@ -108,9 +109,6 @@ fs::absolute(const path& p, error_code& ec) s.remove_prefix(std::min(s.length(), pos) - 1); } - // s must be null-terminated - __glibcxx_assert(!s.empty() && s.back() == 0); - uint32_t len = 1024; wstring buf; do