- delete_list[dlist_len].dev = file->dev;
- delete_list[dlist_len].inode = file->inode;
- dlist_len++;
-
- if (verbose > 3)
- rprintf(FINFO,"added %s to delete list\n", f_name(file));
-}
-
-static void delete_one(char *fn, int is_dir)
-{
- if (!is_dir) {
- if (robust_unlink(fn) != 0) {
- rprintf(FERROR, "delete_one: unlink %s failed: %s\n",
- full_fname(fn), strerror(errno));
- } else if (verbose) {
- rprintf(FINFO, "deleting %s\n", fn);
- }
- } else {
- if (do_rmdir(fn) != 0) {
- if (errno != ENOTEMPTY && errno != EEXIST) {
- rprintf(FERROR, "delete_one: rmdir %s failed: %s\n",
- full_fname(fn), strerror(errno));
- }
- } else if (verbose) {
- rprintf(FINFO, "deleting directory %s\n", fn);
- }
- }
-}
-
-
-static int is_backup_file(char *fn)
-{
- int k = strlen(fn) - backup_suffix_len;
- return k > 0 && strcmp(fn+k, backup_suffix) == 0;
-}
-
-
-/* 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 */