[SCM] The rsync repository. - branch master updated
Rsync CVS commit messages
rsync-cvs at lists.samba.org
Sat May 30 06:38:56 UTC 2020
The branch, master has been updated
via a931301b Search for double-fuzzy files only when needed
from 265b0bc9 Silence a strncpy() warning.
https://git.samba.org/?p=rsync.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit a931301bef955a6fbc790a8b8c4f5e127419d4d8
Author: benrubson <6764151+benrubson at users.noreply.github.com>
Date: Tue May 26 16:06:07 2020 +0200
Search for double-fuzzy files only when needed
-----------------------------------------------------------------------
Summary of changes:
generator.c | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
Changeset truncated at 500 lines:
diff --git a/generator.c b/generator.c
index b90c7ccd..dba97d85 100644
--- a/generator.c
+++ b/generator.c
@@ -1315,21 +1315,6 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
}
parent_dirname = dn;
- if (need_fuzzy_dirlist && S_ISREG(file->mode)) {
- int i;
- strlcpy(fnamecmpbuf, dn, sizeof fnamecmpbuf);
- for (i = 0; i < fuzzy_basis; i++) {
- if (i && pathjoin(fnamecmpbuf, MAXPATHLEN, basis_dir[i-1], dn) >= MAXPATHLEN)
- continue;
- fuzzy_dirlist[i] = get_dirlist(fnamecmpbuf, -1, GDL_IGNORE_FILTER_RULES | GDL_PERHAPS_DIR);
- if (fuzzy_dirlist[i] && fuzzy_dirlist[i]->used == 0) {
- flist_free(fuzzy_dirlist[i]);
- fuzzy_dirlist[i] = NULL;
- }
- }
- need_fuzzy_dirlist = 0;
- }
-
statret = link_stat(fname, &sx.st, keep_dirlinks && is_dir);
stat_errno = errno;
}
@@ -1740,6 +1725,22 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
partialptr = NULL;
if (statret != 0 && fuzzy_basis) {
+ if (need_fuzzy_dirlist && S_ISREG(file->mode)) {
+ const char *dn = file->dirname ? file->dirname : ".";
+ int i;
+ strlcpy(fnamecmpbuf, dn, sizeof fnamecmpbuf);
+ for (i = 0; i < fuzzy_basis; i++) {
+ if (i && pathjoin(fnamecmpbuf, MAXPATHLEN, basis_dir[i-1], dn) >= MAXPATHLEN)
+ continue;
+ fuzzy_dirlist[i] = get_dirlist(fnamecmpbuf, -1, GDL_IGNORE_FILTER_RULES | GDL_PERHAPS_DIR);
+ if (fuzzy_dirlist[i] && fuzzy_dirlist[i]->used == 0) {
+ flist_free(fuzzy_dirlist[i]);
+ fuzzy_dirlist[i] = NULL;
+ }
+ }
+ need_fuzzy_dirlist = 0;
+ }
+
/* Sets fnamecmp_type to FNAMECMP_FUZZY or above. */
fuzzy_file = find_fuzzy(file, fuzzy_dirlist, &fnamecmp_type);
if (fuzzy_file) {
--
The rsync repository.
More information about the rsync-cvs
mailing list