From 8470a515ef97ba971409fbdab7f1c8d0ab017b5d Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 23 Feb 2006 20:27:17 +0000 Subject: [PATCH] Some improved fuzzy-parent-dir logic. --- generator.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/generator.c b/generator.c index b6abc2c0..2b6c2536 100644 --- a/generator.c +++ b/generator.c @@ -773,7 +773,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, static int missing_below = -1, excluded_below = -1; static char *parent_dirname = ""; static struct file_list *fuzzy_dirlist = NULL; - static struct file_list *need_dirlist = (struct file_list *)""; + static int need_fuzzy_dirlist = 0; struct file_struct *fuzzy_file = NULL; int fd = -1, f_copy = -1; STRUCT_STAT st, real_st, partial_st; @@ -789,8 +789,7 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, if (!fname) { if (fuzzy_dirlist) { - if (fuzzy_dirlist != need_dirlist) - flist_free(fuzzy_dirlist); + flist_free(fuzzy_dirlist); fuzzy_dirlist = NULL; } if (missing_below >= 0) { @@ -841,16 +840,15 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, full_fname(dn)); } if (fuzzy_dirlist) { - if (fuzzy_dirlist != need_dirlist) - flist_free(fuzzy_dirlist); + flist_free(fuzzy_dirlist); fuzzy_dirlist = NULL; } if (fuzzy_basis) - fuzzy_dirlist = need_dirlist; + need_fuzzy_dirlist = 1; } parent_dirname = dn; - if (fuzzy_dirlist == need_dirlist && S_ISREG(file->mode)) + if (need_fuzzy_dirlist && S_ISREG(file->mode)) fuzzy_dirlist = get_dirlist(dn, -1, 1); statret = link_stat(fname, &st, -- 2.34.1