handle --relative really well:
- We must set "is_dot_dir" when we strip off a trailing "/" or "/.".
- If a trailing "/" or "/." caused us to treat a symlink as a dir,
we now pass our stat() info down to make_file() so that it will
always treat the cleaned-up name as a dir too.
- We must not strip a leading "/".
- Improved the check for ".." elements in the implied dirs.
to take an integer count instead of a struct file_list so that we
can pass in a file-list-count offset for delete's separate calls
to send_directory().
a new function: send_if_directory(). This lets the code that is
recursively descending through the directories make its list of a
dir's contents and close the DIR handle before recursing into the
subdirs. Also, the "recurse" var is just true/false once again.
- Made filesystem_dev a global that the generator can set during its
delete pass.
- Fixed an off-by-one boundary check in send_directory().
- Added an arg to get_dirlist() so that delete_in_dir() can call it
efficiently.
can't delete a backup file that we just created.
- The rename-directory-for-backup heuristic now checks the
DEL_FORCE_RECURSE flag, not the zap_dir variable. We also set
the flag when we recurse so that only the root dir of a deleted
hierarchy can be missing the flag (and thus be a call from the
generator).
older versions: (1) we no longer complain if excluded files
sticking around cause us to not be able to remove a subdir, and
(2) we output the name of the removed subdir after it has been
successfully removed.
removing files we just backed up to the current directory and to
rename a non-empty dir to dir~ (when no backup-dir is specified).
- Made delete_missing() static.
a recursive delete reuse our buffer from f_name().
- Moved the backup-handling into delete_file() in rsync.c.
- Moved the --max-delete counting into delete_file() in rsync.c.
equal value without being equal pointers, substitute one of the
pointers for the other in the file list. This optimizes future name
comparisons. Note also that this optimization won't be triggered
very often (because rsync tends to send the names grouped by dir-
name at transmission time), but it's nice to be able to assume that
all files in the same dir have identical dir-name pointers after the
qsort is finished.
of storing it into the files[] array.
- Made flist_find() return "no match" if the found item differs in
its directory-ness from the search item.
- Changed f_name_cmp() to sort sub-directories after non-directories
for each directory's contents. This makes things like the upcoming
--fuzzy patch easier to get right.
- One complicating factor is that clean_flist() needed some extra
code to ensure that a directory doesn't duplicate a non-directory
of the same name.
- Make sure that the "strip_root" code in clean_flist() (for relative
paths) strips off all leading slashes.