X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/cdcd21373a3358b21132ad227fe21a8543e45090..9668a39c888edb2391f80624c2fd9e87128c3e37:/backup-dir-dels.diff diff --git a/backup-dir-dels.diff b/backup-dir-dels.diff index 9cb5b7b..a724472 100644 --- a/backup-dir-dels.diff +++ b/backup-dir-dels.diff @@ -75,7 +75,7 @@ To use this patch, run these commands for a successful build: struct file_struct *file; - int len = backup_dir_len; + int len = deleting ? backup_dir_dels_len : backup_dir_len; - statx sx; + stat_x sx; while (*fullpath == '.' && fullpath[1] == '/') { @@ -211,7 +235,8 @@ static int keep_backup(const char *fname @@ -231,7 +231,7 @@ To use this patch, run these commands for a successful build: backup_dir_remainder = sizeof backup_dir_buf - backup_dir_len; @@ -1451,6 +1481,31 @@ int parse_arguments(int *argc_p, const c "P *%s", backup_suffix); - parse_rule(&filter_list, backup_dir_buf, 0, 0); + parse_rule(&filter_list, backup_dir_buf, 0, 0); } + /* If backup_dir_dels not supplied default to backup_dir if it has been supplied */ + if (backup_dir && !backup_dir_dels) {