-/* This function is used to implement --delete-during. */
-void delete_in_dir(struct file_list *flist, char *fname)
+/* This function is used to implement per-directory deletion, and
+ * is used by all the --delete-WHEN options. Note that the fbuf
+ * pointer must point to a MAXPATHLEN buffer with the name of the
+ * directory in it (the functions we call will append names onto
+ * the end, but the old dir value will be restored on exit). */
+void delete_in_dir(struct file_list *flist, char *fbuf,
+ struct file_struct *file)