X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/cefed3e8dc9488adb86ae9be4471641ece53cfa2..1f9ae80a3e0e4efd36264f3d484a366ac8cb90a2:/flist.c diff --git a/flist.c b/flist.c index 5044fb53..8505b9ba 100644 --- a/flist.c +++ b/flist.c @@ -36,6 +36,7 @@ extern int am_server; extern int always_checksum; extern int module_id; extern int ignore_errors; +extern int numeric_ids; extern int cvs_exclude; @@ -78,10 +79,10 @@ static void output_flist(struct file_list *flist); void init_flist(void) { - struct file_struct f; + struct file_struct f; - /* Figure out how big the file_struct is without trailing padding */ - min_file_struct_len = ((char*)&f.flags - (char*)&f) + sizeof f.flags; + /* Figure out how big the file_struct is without trailing padding */ + min_file_struct_len = ((char*)&f.flags - (char*)&f) + sizeof f.flags; } @@ -435,11 +436,13 @@ void send_file_entry(struct file_struct *file, int f, unsigned short base_flags) if (!(flags & XMIT_SAME_MODE)) write_int(f, to_wire_mode(mode)); if (preserve_uid && !(flags & XMIT_SAME_UID)) { - add_uid(uid); + if (!numeric_ids) + add_uid(uid); write_int(f, uid); } if (preserve_gid && !(flags & XMIT_SAME_GID)) { - add_gid(gid); + if (!numeric_ids) + add_gid(gid); write_int(f, gid); } if (preserve_devices && IS_DEVICE(mode)) {