Repository: lucy-clownfish Updated Branches: refs/heads/0.4 e6cf0653c -> d8cdbb22a
Only ignore hidden files within source dirs Don't ignore whole source dir if a path component is hidden. This should fix the Lucy build for CPAN smokers which typically have Clownfish somewhere under a .cpan directory. Should fix CLOWNFISH-8. Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/d8cdbb22 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/d8cdbb22 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/d8cdbb22 Branch: refs/heads/0.4 Commit: d8cdbb22a8b86824b77c9013c73d605736bc9fc7 Parents: e6cf065 Author: Nick Wellnhofer <[email protected]> Authored: Fri Sep 5 20:22:25 2014 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Fri Sep 5 20:28:59 2014 +0200 ---------------------------------------------------------------------- compiler/src/CFCHierarchy.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/d8cdbb22/compiler/src/CFCHierarchy.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCHierarchy.c b/compiler/src/CFCHierarchy.c index 9698e61..dcb8c97 100644 --- a/compiler/src/CFCHierarchy.c +++ b/compiler/src/CFCHierarchy.c @@ -267,6 +267,12 @@ S_parse_parcel_files(const char *source_dir, int is_included) { ++path_part; } + // Ignore hidden files. + if (path_part[0] == '.' + || strstr(path_part, CHY_DIR_SEP ".") != NULL) { + continue; + } + CFCFileSpec *file_spec = CFCFileSpec_new(source_dir, path_part, is_included); CFCParcel *parcel = CFCParcel_new_from_file(path, file_spec); @@ -352,6 +358,12 @@ S_parse_cf_files(CFCHierarchy *self, const char *source_dir, int is_included) { memcpy(path_part, src, path_part_len); path_part[path_part_len] = '\0'; + // Ignore hidden files. + if (path_part[0] == '.' + || strstr(path_part, CHY_DIR_SEP ".") != NULL) { + continue; + } + CFCFileSpec *file_spec = CFCFileSpec_new(source_dir, path_part, is_included); @@ -396,11 +408,6 @@ S_parse_cf_files(CFCHierarchy *self, const char *source_dir, int is_included) { static void S_find_files(const char *path, void *arg) { - // Ignore updirs and hidden files. - if (strstr(path, CHY_DIR_SEP ".") != NULL) { - return; - } - CFCFindFilesContext *context = (CFCFindFilesContext*)arg; const char *ext = context->ext; size_t path_len = strlen(path);
