Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cc1e997
)
Restoring correct skip_file() return semantics.
author
Wayne Davison
<wayned@samba.org>
Wed, 23 Jun 2004 21:21:19 +0000
(21:21 +0000)
committer
Wayne Davison
<wayned@samba.org>
Wed, 23 Jun 2004 21:21:19 +0000
(21:21 +0000)
generator.c
patch
|
blob
|
blame
|
history
diff --git
a/generator.c
b/generator.c
index
5884ee4
..
fa2d9ea
100644
(file)
--- a/
generator.c
+++ b/
generator.c
@@
-61,18
+61,18
@@
extern struct exclude_list_struct server_exclude_list;
static int skip_file(char *fname, struct file_struct *file, STRUCT_STAT *st)
{
if (st->st_size != file->length)
static int skip_file(char *fname, struct file_struct *file, STRUCT_STAT *st)
{
if (st->st_size != file->length)
- return
1
;
+ return
0
;
if (link_dest) {
if (preserve_perms
&& (st->st_mode & CHMOD_BITS) != (file->mode & CHMOD_BITS))
if (link_dest) {
if (preserve_perms
&& (st->st_mode & CHMOD_BITS) != (file->mode & CHMOD_BITS))
- return
1
;
+ return
0
;
if (am_root && preserve_uid && st->st_uid != file->uid)
if (am_root && preserve_uid && st->st_uid != file->uid)
- return
1
;
+ return
0
;
if (preserve_gid && file->gid != GID_NONE
&& st->st_gid != file->gid)
if (preserve_gid && file->gid != GID_NONE
&& st->st_gid != file->gid)
- return
1
;
+ return
0
;
}
/* if always checksum is set then we use the checksum instead
}
/* if always checksum is set then we use the checksum instead
@@
-90,16
+90,16
@@
static int skip_file(char *fname, struct file_struct *file, STRUCT_STAT *st)
}
file_checksum(fname,sum,st->st_size);
return memcmp(sum, file->u.sum, protocol_version < 21 ? 2
}
file_checksum(fname,sum,st->st_size);
return memcmp(sum, file->u.sum, protocol_version < 21 ? 2
- : MD4_SUM_LENGTH)
!
= 0;
+ : MD4_SUM_LENGTH)
=
= 0;
}
if (size_only)
}
if (size_only)
- return
0
;
+ return
1
;
if (ignore_times)
if (ignore_times)
- return
1
;
+ return
0
;
- return cmp_modtime(st->st_mtime, file->modtime)
!
= 0;
+ return cmp_modtime(st->st_mtime, file->modtime)
=
= 0;
}
}
@@
-488,7
+488,7
@@
void recv_generator(char *fname, struct file_struct *file, int i, int f_out)
return;
}
return;
}
- if (
!
skip_file(fname, file, &st)) {
+ if (skip_file(fname, file, &st)) {
if (fnamecmp == fname)
set_perms(fname, file, &st, PERMS_REPORT);
return;
if (fnamecmp == fname)
set_perms(fname, file, &st, PERMS_REPORT);
return;