From d6792632f0a426247167fc91c12c1f640748464f Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 19 Jun 2016 00:09:16 -0700 Subject: Fix recursive scanning of directories ForeachDirectoryEntry didn't actually do anything with the `recursive` parameter, and the corresponding callback parameter was shadowing the actual recursion counters in the user functions. --- src/common/file_util.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/common/file_util.h') diff --git a/src/common/file_util.h b/src/common/file_util.h index 32ae2dc57..7ad7ee829 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h @@ -105,13 +105,11 @@ bool CreateEmptyFile(const std::string &filename); * @param num_entries_out to be assigned by the callable with the number of iterated directory entries, never null * @param directory the path to the enclosing directory * @param virtual_name the entry name, without any preceding directory info - * @param recursion Number of children directory to read before giving up * @return whether handling the entry succeeded */ using DirectoryEntryCallable = std::function; + const std::string& virtual_name)>; /** * Scans a directory, calling the callback for each file/directory contained within. @@ -119,10 +117,9 @@ using DirectoryEntryCallable = std::function