From: Wayne Davison Date: Mon, 14 Mar 2005 03:35:40 +0000 (+0000) Subject: The --fuzzy code now handles a file->dirname that has an identical X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/ccc51c83318d3fbf377bbdbb99f7881053958669 The --fuzzy code now handles a file->dirname that has an identical string as another file without being an identical pointer. --- 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,