X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/3ce3cabe346fed441b840102ec861483d64e126f..d4d56eed8a2dfdd2cd78a19f9c1bae02496427e3:/generator.c diff --git a/generator.c b/generator.c index 6a0d5271..1db0fe01 100644 --- a/generator.c +++ b/generator.c @@ -535,7 +535,10 @@ static void delete_in_dir(char *fbuf, struct file_struct *file, dev_t *fs_dev) f_name(fp, NULL)); continue; } - if (flist_find(cur_flist, fp) < 0) { + /* Here we want to match regardless of file type. Replacement + * of a file with one of another type is handled separately by + * a delete_item call with a DEL_MAKE_ROOM flag. */ + if (flist_find_ignore_dirness(cur_flist, fp) < 0) { int flags = DEL_RECURSE; if (!(fp->mode & S_IWUSR) && !am_root && (uid_t)F_OWNER(fp) == our_uid) flags |= DEL_NO_UID_WRITE;