extern int preserve_times;
extern int relative_paths;
extern int copy_links;
+extern int remote_version;
static char **local_exclude_list = NULL;
write_int(f,(int)file->modtime);
if (!(flags & SAME_MODE))
write_int(f,(int)file->mode);
- if (preserve_uid && !(flags & SAME_UID))
- write_int(f,(int)file->uid);
- if (preserve_gid && !(flags & SAME_GID))
- write_int(f,(int)file->gid);
+ if (preserve_uid && !(flags & SAME_UID)) {
+ add_uid(file->uid);
+ write_int(f,(int)file->uid);
+ }
+ if (preserve_gid && !(flags & SAME_GID)) {
+ add_gid(file->gid);
+ write_int(f,(int)file->gid);
+ }
if (preserve_devices && IS_DEVICE(file->mode) && !(flags & SAME_RDEV))
write_int(f,(int)file->rdev);
clean_flist(flist);
+ /* now send the uid/gid list. This was introduced in protocol version 15 */
+ if (f != -1 && remote_version >= 15) {
+ send_uid_list(f);
+ }
+
return flist;
}
fprintf(FINFO,"done\n");
}
+ /* now recv the uid/gid list. This was introduced in protocol version 15 */
+ if (f != -1 && remote_version >= 15) {
+ recv_uid_list(f, flist);
+ }
+
return flist;
oom:
}
-/* we need this function because of the silly way in which duplicate
- entries are handled in the file lists - we can't change this
- without breaking existing versions */
-static int flist_up(struct file_list *flist, int i)
-{
- while (!flist->files[i].name) i++;
- return i;
-}
-
-
int flist_find(struct file_list *flist,struct file_struct *f)
{
int low=0,high=flist->count-1;