-
--/* For calling delete_item() */
-+/* For calling delete_item() and delete_in_dir() */
- #define DEL_RECURSE (1<<1) /* recurse */
-+#define DEL_NO_DELETIONS (1<<2)
-
- enum nonregtype {
- TYPE_DIR, TYPE_SPECIAL, TYPE_DEVICE, TYPE_SYMLINK
-@@ -116,11 +120,120 @@ static int is_backup_file(char *fn)
+ static int deldelay_size = 0, deldelay_cnt = 0;
+ static char *deldelay_buf = NULL;
+ static int deldelay_fd = -1;
+@@ -115,7 +118,7 @@ static int need_retouch_dir_times;
+ static int need_retouch_dir_perms;
+ static const char *solo_file = NULL;
+
+-/* For calling delete_item() and delete_dir_contents(). */
++/* For calling delete_item(), delete_dir_contents(), and delete_in_dir(). */
+ #define DEL_NO_UID_WRITE (1<<0) /* file/dir has our uid w/o write perm */
+ #define DEL_RECURSE (1<<1) /* if dir, delete all contents */
+ #define DEL_DIR_IS_EMPTY (1<<2) /* internal delete_FUNCTIONS use only */
+@@ -124,6 +127,7 @@ static const char *solo_file = NULL;
+ #define DEL_FOR_SYMLINK (1<<5) /* making room for a replacement symlink */
+ #define DEL_FOR_DEVICE (1<<6) /* making room for a replacement device */
+ #define DEL_FOR_SPECIAL (1<<7) /* making room for a replacement special */
++#define DEL_NO_DELETIONS (1<<9) /* just check for renames w/o deleting */
+
+ #define DEL_MAKE_ROOM (DEL_FOR_FILE|DEL_FOR_DIR|DEL_FOR_SYMLINK|DEL_FOR_DEVICE|DEL_FOR_SPECIAL)
+
+@@ -148,11 +152,121 @@ static int is_backup_file(char *fn)