Moved the code that reads the extra byte for a modern inplace
authorWayne Davison <wayned@samba.org>
Mon, 24 Jan 2005 17:19:04 +0000 (17:19 +0000)
committerWayne Davison <wayned@samba.org>
Mon, 24 Jan 2005 17:19:04 +0000 (17:19 +0000)
transfer up nearer the code that reads the index.

sender.c

index 741a8d2..10ea2fa 100644 (file)
--- a/sender.c
+++ b/sender.c
@@ -138,6 +138,12 @@ void send_files(struct file_list *flist, int f_out, int f_in)
                        exit_cleanup(RERR_PROTOCOL);
                }
 
+               if (inplace && protocol_version >= 29) {
+                       uchar fnamecmp_type = read_byte(f_in);
+                       updating_basis_file = fnamecmp_type == FNAMECMP_FNAME;
+               } else
+                       updating_basis_file = inplace && !make_backups;
+
                file = flist->files[i];
 
                stats.current_file_index = i;
@@ -152,11 +158,6 @@ void send_files(struct file_list *flist, int f_out, int f_in)
                } else
                        offset = 0;
                fname2 = f_name_to(file, fname + offset);
-               if (inplace && protocol_version >= 29) {
-                       uchar fnamecmp_type = read_byte(f_in);
-                       updating_basis_file = fnamecmp_type == FNAMECMP_FNAME;
-               } else
-                       updating_basis_file = inplace && !make_backups;
 
                if (verbose > 2)
                        rprintf(FINFO, "send_files(%d, %s)\n", i, fname);