From 264445eaee4be658e1c7a442512a613f89e9e47c Mon Sep 17 00:00:00 2001 From: Steffen Schuemann Date: Mon, 22 Feb 2021 23:40:39 +0100 Subject: [PATCH] refs #104, fixing last half-commit --- include/ghc/filesystem.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ghc/filesystem.hpp b/include/ghc/filesystem.hpp index b4e7b79..334107f 100644 --- a/include/ghc/filesystem.hpp +++ b/include/ghc/filesystem.hpp @@ -5733,7 +5733,7 @@ GHC_INLINE recursive_directory_iterator& recursive_directory_iterator::increment bool isDir = (*this)->is_directory(ec); bool isSymLink = !ec && (*this)->is_symlink(ec); if(!ec) { - if (recursion_pending() && (*this)->is_directory() && (!(*this)->is_symlink() || (options() & directory_options::follow_directory_symlink) != directory_options::none)) { + 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)); } else {