-c, --checksum always checksum
-a, --archive archive mode (same as -rlptDog)
-r, --recursive recurse into directories
+-R, --relative use relative path names
-b, --backup make backups (default ~ extension)
-u, --update update only (don't overwrite newer files)
-l, --links preserve soft links
To send mail to everyone on the list send it to rsync@samba.anu.edu.au
+BUG REPORTS
+-----------
+
+If you have web access then please look at
+http://samba.anu.edu.au/cgi-bin/rsync
+
+This will give you access to the bug tracking system used by the
+developers of rsync and will allow you to look at other bug reports or
+submit a new bug report.
+
+If you don't have web access then mail bug reports to
+rsync-bugs@samba.anu.edu.au or (if you think it will be of interest to
+lots of people) send it to rsync@samba.anu.edu.au
+
+
COPYRIGHT
---------
{
int total = 0;
fd_set w_fds, r_fds;
- int fd_count;
+ int fd_count, count, got_select=0;
struct timeval tv;
if (buffer_f_in == -1)
if (ret == -1 && !(errno == EWOULDBLOCK || errno == EAGAIN))
return -1;
+ if (ret == -1 && got_select) {
+ fprintf(FERROR,"write exception\n");
+ exit_cleanup(1);
+ }
+
if (ret == -1) {
read_check(buffer_f_in);
if (buffer_f_in > fd)
fd_count = buffer_f_in+1;
}
+
+ got_select = 0;
+
tv.tv_sec = BLOCKING_TIMEOUT;
tv.tv_usec = 0;
- select(fd_count,buffer_f_in == -1? NULL: &r_fds,&w_fds,NULL,&tv);
+ count = select(fd_count,buffer_f_in == -1? NULL: &r_fds,
+ &w_fds,NULL,&tv);
+ if (count == -1 && errno != EINTR) {
+ if (verbose > 1)
+ fprintf(FERROR,"select error: %s\n", strerror(errno));
+ exit_cleanup(1);
+ }
+
+ if (count == 0) continue;
+
+ if (FD_ISSET(fd, &w_fds)) {
+ got_select = 1;
+ }
} else {
total += ret;
}
}
+/* this deletes any files on the receiving side that are not present
+ on the sending side. For version 1.6.4 I have changed the behaviour
+ to match more closely what most people seem to expect of this option */
static void delete_files(struct file_list *flist)
{
struct file_list *local_file_list;
char *dot=".";
- int i;
+ int i, j;
+ char *last_name=NULL;
if (cvs_exclude)
add_cvs_excludes();
- if (!(local_file_list = send_file_list(-1,1,&dot)))
- return;
-
- for (i=local_file_list->count-1;i>=0;i--) {
- if (!local_file_list->files[i].name) continue;
- if (-1 == flist_find(flist,&local_file_list->files[i])) {
- delete_one(&local_file_list->files[i]);
- }
+ for (j=0;j<flist->count;j++) {
+ if (!S_ISDIR(flist->files[j].mode)) continue;
+ if (strcmp(flist->files[j].name,".")==0) continue;
+ if (last_name &&
+ flist->files[j].name[strlen(last_name)] == '/' &&
+ strncmp(flist->files[j].name,last_name, strlen(last_name))==0)
+ continue;
+ last_name = flist->files[j].name;
+ if (verbose > 1)
+ fprintf(FINFO,"deleting in %s\n", last_name);
+ if (!(local_file_list = send_file_list(-1,1,&last_name)))
+ return;
+
+ for (i=local_file_list->count-1;i>=0;i--) {
+ if (!local_file_list->files[i].name) continue;
+ if (-1 == flist_find(flist,&local_file_list->files[i])) {
+ delete_one(&local_file_list->files[i]);
+ }
+ }
}
}