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: https://lists.samba.org/archive/rsync/2008-March/020276.html bug 7618
Created attachment 6630 [details] Patch W00t! My first patch since about a year ago! Also in my repository at https://mattmccutchen.net/rsync/rsync.git/?a=commitdiff;h=ddc5ae3d9e6cc632b93bac327b6f92d0545b0537 .