Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Restored the io_error test to delete_files().
[rsync/rsync.git]
/
receiver.c
diff --git
a/receiver.c
b/receiver.c
index
dc6f5e2
..
e129b1d
100644
(file)
--- a/
receiver.c
+++ b/
receiver.c
@@
-21,7
+21,6
@@
#include "rsync.h"
extern int verbose;
#include "rsync.h"
extern int verbose;
-extern int recurse;
extern int delete_after;
extern int csum_length;
extern struct stats stats;
extern int delete_after;
extern int csum_length;
extern struct stats stats;
@@
-57,15
+56,29
@@
extern struct filter_list_struct server_filter_list;
* sending side. This is used by --delete-before and --delete-after. */
void delete_files(struct file_list *flist)
{
* sending side. This is used by --delete-before and --delete-after. */
void delete_files(struct file_list *flist)
{
- char fbuf[MAXPATHLEN];
+ struct file_list *dir_list;
+ char *argv[1], fbuf[MAXPATHLEN];
int j;
int j;
+ if (io_error && !(lp_ignore_errors(module_id) || ignore_errors)) {
+ rprintf(FINFO,
+ "IO error encountered - skipping file deletion\n");
+ return;
+ }
+
for (j = 0; j < flist->count; j++) {
if (!(flist->files[j]->flags & FLAG_DEL_START)
|| !S_ISDIR(flist->files[j]->mode))
continue;
for (j = 0; j < flist->count; j++) {
if (!(flist->files[j]->flags & FLAG_DEL_START)
|| !S_ISDIR(flist->files[j]->mode))
continue;
- delete_in_dir(flist, f_name_to(flist->files[j], fbuf));
+ argv[0] = f_name_to(flist->files[j], fbuf);
+
+ if (!(dir_list = send_file_list(-1, 1, argv)))
+ continue;
+
+ delete_missing(flist, dir_list, fbuf);
+
+ flist_free(dir_list);
}
}
}
}
@@
-586,7
+599,7
@@
int recv_files(int f_in, struct file_list *flist, char *local_name,
}
}
}
}
- if (delete_after &&
recurse &&
!local_name && flist->count > 0)
+ if (delete_after && !local_name && flist->count > 0)
delete_files(flist);
if (verbose > 2)
delete_files(flist);
if (verbose > 2)