mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-06-11 02:36:33 +08:00
refs #122, fix for dead symlink iteration error
This commit is contained in:
parent
7e009bcf6f
commit
873a55addf
@ -551,6 +551,8 @@ to the expected behavior.
|
||||
|
||||
### v1.5.5 (WIP)
|
||||
|
||||
* Fix for [#122](https://github.com/gulrak/filesystem/issues/122), incrementing
|
||||
the `recursive_directory_iterator` will not try to enter dead symlinks.
|
||||
* Fix for [#119](https://github.com/gulrak/filesystem/issues/119), added missing
|
||||
support for char16_t and char32_t and on C++20 char8_t literals.
|
||||
* Pull request [#118](https://github.com/gulrak/filesystem/pull/118), when
|
||||
|
@ -5802,8 +5802,11 @@ GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::operator+
|
||||
|
||||
GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::increment(std::error_code& ec) noexcept
|
||||
{
|
||||
bool isDir = (*this)->is_directory(ec);
|
||||
bool isSymLink = !ec && (*this)->is_symlink(ec);
|
||||
bool isSymLink = (*this)->is_symlink(ec);
|
||||
bool isDir = !ec && (*this)->is_directory(ec);
|
||||
if(isSymLink && detail::is_not_found_error(ec)) {
|
||||
ec.clear();
|
||||
}
|
||||
if(!ec) {
|
||||
if (recursion_pending() && isDir && (!isSymLink || (options() & directory_options::follow_directory_symlink) != directory_options::none)) {
|
||||
_impl->_dir_iter_stack.push(directory_iterator((*this)->path(), _impl->_options, ec));
|
||||
|
Loading…
x
Reference in New Issue
Block a user