---- orig/receiver.c 2004-07-23 21:59:07
-+++ receiver.c 2004-07-23 22:08:03
-@@ -39,7 +39,6 @@ extern int cvs_exclude;
- extern int io_error;
- extern char *tmpdir;
- extern char *partial_dir;
--extern char *compare_dest;
- extern int make_backups;
- extern int do_progress;
- extern char *backup_dir;
+--- orig/receiver.c 2004-07-30 07:17:48
++++ receiver.c 2004-07-30 18:21:38
+@@ -323,6 +323,27 @@ static int receive_data(int f_in, char *
+ }
+
+
++static void read_gen_name(int fd, char *buf)
++{
++ int len = read_byte(fd);
++ if (len & 0x80) {
++#if MAXPATHLEN > 32767
++ uchar lenbuf[2];
++ read_buf(fd, (char *)lenbuf, 2);
++ len = (len & ~0x80) * 0x10000 + lenbuf[0] * 0x100 + lenbuf[1];
++#else
++ len = (len & ~0x80) * 0x100 + read_byte(fd);
++#endif
++ }
++ if (len >= MAXPATHLEN) {
++ rprintf(FERROR, "bogus data on generator name pipe\n");
++ exit_cleanup(RERR_PROTOCOL);
++ }
++
++ read_sbuf(fd, buf, len);
++}
++
++
+ static void discard_receive_data(int f_in, OFF_T length)
+ {
+ receive_data(f_in, NULL, -1, 0, NULL, -1, length);
+@@ -449,6 +470,10 @@ int recv_files(int f_in, struct file_lis
+ case G2R_PARTIAL_DIR:
+ fnamecmp = partialptr ? partialptr : fname;
+ break;
++ case G2R_FUZZY:
++ read_gen_name(f_in_name, fnamecmpbuf);
++ fnamecmp = fnamecmpbuf;
++ break;
+ default:
+ pathjoin(fnamecmpbuf, sizeof fnamecmpbuf,
+ compare_dest, fname);
+--- orig/rsync.h 2004-07-30 07:16:38
++++ rsync.h 2004-07-30 07:45:40
+@@ -120,6 +120,7 @@
+
+ #define G2R_FNAME 0x80
+ #define G2R_PARTIAL_DIR 0x81
++#define G2R_FUZZY 0x82
+
+
+ /* Log-message categories. FLOG is only used on the daemon side to