Use the new FNAMECMP_BASIS_DIR_HIGH to improve a compare-dest check.
authorWayne Davison <wayned@samba.org>
Sat, 15 Jan 2005 21:17:39 +0000 (21:17 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 15 Jan 2005 21:17:39 +0000 (21:17 +0000)
generator.c

index e9e47ac..2ffd03f 100644 (file)
@@ -47,7 +47,7 @@ extern int protocol_version;
 extern int always_checksum;
 extern char *partial_dir;
 extern char *basis_dir[];
-extern int copy_dest;
+extern int compare_dest;
 extern int link_dest;
 extern int whole_file;
 extern int local_server;
@@ -467,13 +467,13 @@ static void recv_generator(char *fname, struct file_struct *file, int i,
                                                        safe_fname(fname));
                                        }
                                        fnamecmp = fnamecmpbuf;
-                                       fnamecmp_type = FNAMECMP_BASIS_DIR + i;
+                                       fnamecmp_type = i;
                                }
                        } else
 #endif
                        {
                                fnamecmp = fnamecmpbuf;
-                               fnamecmp_type = FNAMECMP_BASIS_DIR + i;
+                               fnamecmp_type = i;
                        }
                }
        }
@@ -519,7 +519,7 @@ static void recv_generator(char *fname, struct file_struct *file, int i,
                return;
        }
 
-       if ((link_dest || copy_dest) && fnamecmp_type != FNAMECMP_FNAME)
+       if (!compare_dest && fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
                ;
        else if (unchanged_file(fnamecmp, file, &st)) {
                if (fnamecmp_type == FNAMECMP_FNAME)