Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Some improved fuzzy-parent-dir logic.
[rsync/rsync.git]
/
generator.c
diff --git
a/generator.c
b/generator.c
index
f8ec71b
..
2b6c253
100644
(file)
--- a/
generator.c
+++ b/
generator.c
@@
-773,6
+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 int missing_below = -1, excluded_below = -1;
static char *parent_dirname = "";
static struct file_list *fuzzy_dirlist = NULL;
+ 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;
struct file_struct *fuzzy_file = NULL;
int fd = -1, f_copy = -1;
STRUCT_STAT st, real_st, partial_st;
@@
-843,10
+844,13
@@
static void recv_generator(char *fname, struct file_struct *file, int ndx,
fuzzy_dirlist = NULL;
}
if (fuzzy_basis)
fuzzy_dirlist = NULL;
}
if (fuzzy_basis)
-
fuzzy_dirlist = get_dirlist(dn, -1, 1)
;
+
need_fuzzy_dirlist = 1
;
}
parent_dirname = dn;
}
parent_dirname = dn;
+ if (need_fuzzy_dirlist && S_ISREG(file->mode))
+ fuzzy_dirlist = get_dirlist(dn, -1, 1);
+
statret = link_stat(fname, &st,
keep_dirlinks && S_ISDIR(file->mode));
stat_errno = errno;
statret = link_stat(fname, &st,
keep_dirlinks && S_ISDIR(file->mode));
stat_errno = errno;