mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-02-18 15:16:24 -05:00
When preforming a recursive delete, push/pop the per-dir merge rules.
This commit is contained in:
5
flist.c
5
flist.c
@@ -1790,6 +1790,7 @@ int delete_file(char *fname, int mode, int flags)
|
||||
struct file_list *dirlist;
|
||||
char buf[MAXPATHLEN];
|
||||
int j, zap_dir, ok;
|
||||
void *save_filters;
|
||||
|
||||
if (max_delete && deletion_count >= max_delete)
|
||||
return -1;
|
||||
@@ -1837,6 +1838,8 @@ int delete_file(char *fname, int mode, int flags)
|
||||
}
|
||||
flags |= DEL_FORCE_RECURSE;
|
||||
|
||||
save_filters = push_local_filters(fname, strlen(fname));
|
||||
|
||||
dirlist = get_dirlist(fname, 0);
|
||||
for (j = dirlist->count; j--; ) {
|
||||
struct file_struct *fp = dirlist->files[j];
|
||||
@@ -1848,6 +1851,8 @@ int delete_file(char *fname, int mode, int flags)
|
||||
}
|
||||
flist_free(dirlist);
|
||||
|
||||
pop_local_filters(save_filters);
|
||||
|
||||
if (max_delete && deletion_count >= max_delete)
|
||||
return -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user