There is a lot of logic duplicated between these two functions. Factoring it out would make it easier to add support for preserving new attributes and would cut down on the number of bugs in one function but not the other, such as:
Created attachment 6630 [details]
W00t! My first patch since about a year ago! Also in my repository at https://mattmccutchen.net/rsync/rsync.git/?a=commitdiff;h=ddc5ae3d9e6cc632b93bac327b6f92d0545b0537 .