--- generator.c 18 Mar 2007 06:00:54 -0000 1.334 +++ generator.c 27 Mar 2007 22:26:32 -0000 @@ -468,6 +468,18 @@ static void delete_in_dir(struct file_li } if (flist_find(flist, fp) < 0) { f_name(fp, delbuf); + if (!preserve_links && S_ISLNK(fp->mode)) { + rprintf(FINFO, "not deleting symlink: %s\n", delbuf); + continue; + } + if (!preserve_devices && IS_DEVICE(fp->mode)) { + rprintf(FINFO, "not deleting device file: %s\n", delbuf); + continue; + } + if (!preserve_specials && IS_SPECIAL(fp->mode)) { + rprintf(FINFO, "not deleting special file: %s\n", delbuf); + continue; + } if (delete_during == 2) { if (!remember_delete(fp, delbuf)) break;