added --existing option, similar to one suggested by Gildas Quiniou <gildas@stip.fr>
[rsync/rsync.git] / sender.c
index 4a344ea..3a44346 100644 (file)
--- a/sender.c
+++ b/sender.c
@@ -160,7 +160,7 @@ void send_files(struct file_list *flist,int f_out,int f_in)
                        return;
                }
          
-               fd = open(fname,O_RDONLY);
+               fd = do_open(fname, O_RDONLY, 0);
                if (fd == -1) {
                        io_error = 1;
                        rprintf(FERROR,"send_files failed to open %s: %s\n",
@@ -200,6 +200,8 @@ void send_files(struct file_list *flist,int f_out,int f_in)
                if (!am_server) {
                        log_transfer(file, fname+offset);
                }
+
+               set_compression(fname);
          
                match_sums(f_out,s,buf,st.st_size);