Repository: lucy-clownfish Updated Branches: refs/heads/master a6568feb3 -> 1736feba2
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/1736feba Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/1736feba Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/1736feba Branch: refs/heads/master Commit: 1736feba20fca2c3518fde0eef1a0f9fe55708cd Parents: a6568fe Author: Nick Wellnhofer <[email protected]> Authored: Fri Sep 5 20:22:25 2014 +0200 Committer: Nick Wellnhofer <[email protected]> Committed: Fri Sep 5 20:26:33 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/1736feba/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);
