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
Added parsing for --delete-delay.
[rsync/rsync.git]
/
generator.c
diff --git
a/generator.c
b/generator.c
index
386483a
..
ffd8ab7
100644
(file)
--- a/
generator.c
+++ b/
generator.c
@@
-98,9
+98,9
@@
int non_perishable_cnt = 0;
static int deletion_count = 0; /* used to implement --max-delete */
static int deletion_count = 0; /* used to implement --max-delete */
-/* For calling delete_item() */
+/* For calling delete_item()
and delete_dir_contents().
*/
#define DEL_RECURSE (1<<1) /* recurse */
#define DEL_RECURSE (1<<1) /* recurse */
-#define DEL_DIR_IS_EMPTY (1<<2) /*
used by delete_dir_contents()
*/
+#define DEL_DIR_IS_EMPTY (1<<2) /*
internal delete_FUNCTIONS use only
*/
enum nonregtype {
TYPE_DIR, TYPE_SPECIAL, TYPE_DEVICE, TYPE_SYMLINK
enum nonregtype {
TYPE_DIR, TYPE_SPECIAL, TYPE_DEVICE, TYPE_SYMLINK
@@
-395,7
+395,7
@@
int unchanged_attrs(struct file_struct *file, STRUCT_STAT *st)
}
void itemize(struct file_struct *file, int ndx, int statret, STRUCT_STAT *st,
}
void itemize(struct file_struct *file, int ndx, int statret, STRUCT_STAT *st,
- int32 iflags, uchar fnamecmp_type, char *xname)
+ int32 iflags, uchar fnamecmp_type, c
onst c
har *xname)
{
if (statret >= 0) { /* A from-dest-dir statret can == 1! */
int keep_time = !preserve_times ? 0
{
if (statret >= 0) { /* A from-dest-dir statret can == 1! */
int keep_time = !preserve_times ? 0
@@
-526,8
+526,8
@@
static void sum_sizes_sqroot(struct sum_struct *sum, int64 len)
sum->flength = len;
sum->blength = blength;
sum->s2length = s2length;
sum->flength = len;
sum->blength = blength;
sum->s2length = s2length;
- sum->remainder =
len % blength
;
- sum->count =
len / blength
+ (sum->remainder != 0);
+ sum->remainder =
(int32)(len % blength)
;
+ sum->count =
(int32)(len / blength)
+ (sum->remainder != 0);
if (sum->count && verbose > 2) {
rprintf(FINFO,
if (sum->count && verbose > 2) {
rprintf(FINFO,
@@
-919,7
+919,7
@@
static void recv_generator(char *fname, struct file_struct *file, int ndx,
enum logcode code, int f_out)
{
static int missing_below = -1, excluded_below = -1;
enum logcode code, int f_out)
{
static int missing_below = -1, excluded_below = -1;
- static char *parent_dirname = "";
+ static c
onst c
har *parent_dirname = "";
static struct file_list *fuzzy_dirlist = NULL;
static int need_fuzzy_dirlist = 0;
struct file_struct *fuzzy_file = NULL;
static struct file_list *fuzzy_dirlist = NULL;
static int need_fuzzy_dirlist = 0;
struct file_struct *fuzzy_file = NULL;
@@
-984,7
+984,7
@@
static void recv_generator(char *fname, struct file_struct *file, int ndx,
statret = -1;
stat_errno = ENOENT;
} else {
statret = -1;
stat_errno = ENOENT;
} else {
- char *dn = file->dirname ? file->dirname : ".";
+ c
onst c
har *dn = file->dirname ? file->dirname : ".";
if (parent_dirname != dn && strcmp(parent_dirname, dn) != 0) {
if (relative_paths && !implied_dirs
&& do_stat(dn, &st) < 0
if (parent_dirname != dn && strcmp(parent_dirname, dn) != 0) {
if (relative_paths && !implied_dirs
&& do_stat(dn, &st) < 0
@@
-1003,7
+1003,8
@@
static void recv_generator(char *fname, struct file_struct *file, int ndx,
parent_dirname = dn;
if (need_fuzzy_dirlist && S_ISREG(file->mode)) {
parent_dirname = dn;
if (need_fuzzy_dirlist && S_ISREG(file->mode)) {
- fuzzy_dirlist = get_dirlist(dn, -1, 1);
+ strlcpy(fnamecmpbuf, dn, sizeof fnamecmpbuf);
+ fuzzy_dirlist = get_dirlist(fnamecmpbuf, -1, 1);
need_fuzzy_dirlist = 0;
}
need_fuzzy_dirlist = 0;
}