extern int need_messages_from_generator;
extern int delete_mode, delete_before, delete_during, delete_after;
extern int delete_excluded;
+extern int detect_renamed;
extern int make_backups;
extern int need_messages_from_generator;
extern int delete_mode, delete_before, delete_during, delete_after;
extern int delete_excluded;
+extern int detect_renamed;
extern int make_backups;
- if (recurse && !preserve_hard_links && !delete_before
-- && !delete_after && !delay_updates && !prune_empty_dirs)
-+ && !delete_after && !delay_updates && !prune_empty_dirs
-+ && !detect_renamed)
+ if (recurse && allow_inc_recurse && !preserve_hard_links
+ && !delete_before && !delete_after && !delay_updates
+- && !prune_empty_dirs && !use_qsort)
++ && !prune_empty_dirs && !use_qsort && !detect_renamed)
-@@ -1765,6 +1807,25 @@ struct file_list *recv_file_list(int f)
-
- clean_flist(flist, relative_paths, 1);
+@@ -1915,6 +1957,25 @@ struct file_list *send_file_list(int f,
+ if (verbose > 2)
+ rprintf(FINFO, "send_file_list done\n");
extern int backup_suffix_len;
extern struct file_list *cur_flist, *first_flist, *dir_flist;
extern struct filter_list_struct server_filter_list;
+extern struct file_list the_fattr_list;
extern int backup_suffix_len;
extern struct file_list *cur_flist, *first_flist, *dir_flist;
extern struct filter_list_struct server_filter_list;
+extern struct file_list the_fattr_list;
static int deldelay_size = 0, deldelay_cnt = 0;
static char *deldelay_buf = NULL;
static int deldelay_fd = -1;
static int deldelay_size = 0, deldelay_cnt = 0;
static char *deldelay_buf = NULL;
static int deldelay_fd = -1;
* its contents, otherwise just checks for content. Returns DR_SUCCESS or
* DR_NOT_EMPTY. Note that fname must point to a MAXPATHLEN buffer! (The
* buffer is used for recursion, but returned unchanged.)
* its contents, otherwise just checks for content. Returns DR_SUCCESS or
* DR_NOT_EMPTY. Note that fname must point to a MAXPATHLEN buffer! (The
* buffer is used for recursion, but returned unchanged.)
* all the --delete-WHEN options. Note that the fbuf pointer must point to a
* MAXPATHLEN buffer with the name of the directory in it (the functions we
* call will append names onto the end, but the old dir value will be restored
- * on exit). */
* all the --delete-WHEN options. Note that the fbuf pointer must point to a
* MAXPATHLEN buffer with the name of the directory in it (the functions we
* call will append names onto the end, but the old dir value will be restored
- * on exit). */
- static void delete_in_dir(struct file_list *flist, char *fbuf,
-- struct file_struct *file, dev_t *fs_dev)
-+ struct file_struct *file, dev_t *fs_dev, int flags)
++static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev,
++ int flags)
/* If an item in dirlist is not found in flist, delete it
* from the filesystem. */
for (i = dirlist->count; i--; ) {
/* If an item in dirlist is not found in flist, delete it
* from the filesystem. */
for (i = dirlist->count; i--; ) {
+ strlcpy(p, fp->basename, remainder);
+ look_for_rename(fp, fbuf);
+ }
+ strlcpy(p, fp->basename, remainder);
+ look_for_rename(fp, fbuf);
+ }
-- delete_in_dir(flist, fbuf, file, &st.st_dev);
-+ delete_in_dir(flist, fbuf, file, &st.st_dev, 0);
+- delete_in_dir(fbuf, file, &st.st_dev);
++ delete_in_dir(fbuf, file, &st.st_dev, 0);
-- delete_in_dir(NULL, NULL, NULL, &dev_zero);
-+ delete_in_dir(NULL, NULL, NULL, &dev_zero, 0);
+- delete_in_dir(NULL, NULL, &dev_zero);
++ delete_in_dir(NULL, NULL, &dev_zero, 0);
-- delete_in_dir(cur_flist, f_name(fp, fbuf), fp, &dirdev);
-+ delete_in_dir(cur_flist, f_name(fp, fbuf), fp, &dirdev, 0);
+- delete_in_dir(f_name(fp, fbuf), fp, &dirdev);
++ delete_in_dir(f_name(fp, fbuf), fp, &dirdev, 0);
-- delete_in_dir(NULL, NULL, NULL, &dev_zero);
-+ delete_in_dir(NULL, NULL, NULL, &dev_zero, 0);
+- delete_in_dir(NULL, NULL, &dev_zero);
++ delete_in_dir(NULL, NULL, &dev_zero, 0);
rprintf(F," --modify-window=NUM compare mod-times with reduced accuracy\n");
rprintf(F," -T, --temp-dir=DIR create temporary files in directory DIR\n");
rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n");
rprintf(F," --modify-window=NUM compare mod-times with reduced accuracy\n");
rprintf(F," -T, --temp-dir=DIR create temporary files in directory DIR\n");
rprintf(F," -y, --fuzzy find similar file for basis if no dest file\n");
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n");
rprintf(F," --copy-dest=DIR ... and include copies of unchanged files\n");
rprintf(F," --link-dest=DIR hardlink to files in DIR when unchanged\n");
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
+ {"detect-renamed", 0, POPT_ARG_NONE, &detect_renamed, 0, 0, 0 },
{"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 },
{"compress", 'z', POPT_ARG_NONE, 0, 'z', 0, 0 },
{"compare-dest", 0, POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
{"copy-dest", 0, POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
{"link-dest", 0, POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
+ {"detect-renamed", 0, POPT_ARG_NONE, &detect_renamed, 0, 0, 0 },
{"fuzzy", 'y', POPT_ARG_NONE, &fuzzy_basis, 0, 0, 0 },
{"compress", 'z', POPT_ARG_NONE, 0, 'z', 0, 0 },
- {"compress-level", 0, POPT_ARG_INT, &def_compress_level, 'z', 0, 0 },
-@@ -1397,7 +1400,7 @@ int parse_arguments(int *argc, const cha
+ {"no-compress", 0, POPT_ARG_VAL, &do_compression, 0, 0, 0 },
+@@ -1488,7 +1491,7 @@ int parse_arguments(int *argc, const cha
snprintf(err_buf, sizeof err_buf,
"--%s cannot be used with --%s\n",
append_mode ? "append" : "inplace",
snprintf(err_buf, sizeof err_buf,
"--%s cannot be used with --%s\n",
append_mode ? "append" : "inplace",
--modify-window=NUM compare mod-times with reduced accuracy
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
--modify-window=NUM compare mod-times with reduced accuracy
-T, --temp-dir=DIR create temporary files in directory DIR
-y, --fuzzy find similar file for basis if no dest file
--compare-dest=DIR also compare received files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged
--compare-dest=DIR also compare received files relative to DIR
--copy-dest=DIR ... and include copies of unchanged files
--link-dest=DIR hardlink to files in DIR when unchanged