From ccc51c83318d3fbf377bbdbb99f7881053958669 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 14 Mar 2005 03:35:40 +0000 Subject: [PATCH] The --fuzzy code now handles a file->dirname that has an identical string as another file without being an identical pointer. --- generator.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/generator.c b/generator.c index 34462c87..d33d5d06 100644 --- a/generator.c +++ b/generator.c @@ -647,15 +647,13 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx, } else { if (fuzzy_basis && S_ISREG(file->mode)) { char *dn = file->dirname ? file->dirname : "."; - /* Yes, identical dirnames are guaranteed to have - * identical pointers at this point. */ - if (fuzzy_dirname != dn) { + if (fuzzy_dirname != dn + && strcmp(fuzzy_dirname, dn) != 0) { if (fuzzy_dirlist) flist_free(fuzzy_dirlist); - fuzzy_dirname = dn; - fuzzy_dirlist = get_dirlist(fuzzy_dirname, -1, - 1); + fuzzy_dirlist = get_dirlist(dn, -1, 1); } + fuzzy_dirname = dn; } statret = link_stat(fname, &st, -- 2.34.1