From ff92d0af44fa454d066f6ee3fe2becd97206b64e Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Thu, 24 Apr 2014 21:59:46 +0200 Subject: Expanded FunctionReadDirectory class to return files and directories * they are marked appropriately by a _type_ attribute --- src/support/filesystem_context.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/support') diff --git a/src/support/filesystem_context.cc b/src/support/filesystem_context.cc index d0813c2..baeccf3 100644 --- a/src/support/filesystem_context.cc +++ b/src/support/filesystem_context.cc @@ -40,7 +40,8 @@ void FilesystemContext::iterate( for ( boost::filesystem::directory_iterator iter(directory); iter != boost::filesystem::directory_iterator(); ++iter ) { - if ( boost::filesystem::is_regular_file(iter->status()) ) { + if ( boost::filesystem::is_regular_file(iter->status()) || + boost::filesystem::is_directory(iter->status()) ) { func(*iter); } } -- cgit v1.2.3