search for: rule_matches

Displaying 8 results from an estimated 8 matches for "rule_matches".

2019 Mar 22
2
Kudos and feature question
Kudos all that maintain this awesome and enduring piece of software. Awesome job, many thanks. I’ve come across a use case that would greatly benefit form a —delete-older-than <secs> argument. This would behave the same as —delete only sparing files dest that have a creating time less than <secs> ago. How hard would this be to implement? Where would I start ? TIA, Francois
2019 Mar 24
0
Kudos and feature question
...g anything by default, but could also use the full pattern-matching capabilities if required). Have a look at: the 'make_backups' logic in parse_arguments(), where it adds a 'Preserve' pattern to match all backup files, name_is_excluded() and its subfunctions check_filter() and rule_matches() in exclude.c You'd need to: define a new filter-type character ('R' for preserve-Recent?) define the format of the filter rule for this type e.g. how to represent the time add code to parse this new ruletype in rule_matches() decide how your new option interacts with existing fi...
2006 Mar 17
0
Patch for 2.6.7 (affects --exclude used with --relative)
...6.7 binaries: Please apply the following one-line patch to the code. It fixes a bug where an absolute --exclude without wildcards would fail to match if --relative is in effect. --- exclude.c 28 Jan 2006 00:14:02 -0000 1.128 +++ exclude.c 13 Mar 2006 01:49:56 -0000 @@ -562,7 +562,7 @@ static int rule_matches(char *name, stru if (litmatch_array(pattern, strings, slash_handling)) return ret_match; } else if (anchored_match) { - if (strcmp(name,pattern) == 0) + if (strcmp(strings[0], pattern) == 0) return ret_match; } else { int l1 = strlen(name); I'm anticipating that version 2.6...
2006 Mar 13
1
rsync 2.6.7 not excluding whole directories
I'm not sure if I was relying on unspecified behavior, but I was in the habit of putting entries like this: /home/tug/public_html into an exclude file. This would omit everything under that directory. (I'm not sure if it omitted the directory itself, but I didn't care.) In rsync 2.6.7, this had no effect, and everything under /home/tug/public_html was copied. I notice that a new
2006 Mar 17
0
Patch for 2.6.7 (affects --exclude used with --relative)
...6.7 binaries: Please apply the following one-line patch to the code. It fixes a bug where an absolute --exclude without wildcards would fail to match if --relative is in effect. --- exclude.c 28 Jan 2006 00:14:02 -0000 1.128 +++ exclude.c 13 Mar 2006 01:49:56 -0000 @@ -562,7 +562,7 @@ static int rule_matches(char *name, stru if (litmatch_array(pattern, strings, slash_handling)) return ret_match; } else if (anchored_match) { - if (strcmp(name,pattern) == 0) + if (strcmp(strings[0], pattern) == 0) return ret_match; } else { int l1 = strlen(name); I'm anticipating that version 2.6...
2007 Oct 26
2
DO NOT REPLY [Bug 5043] New: Qualified non-inherited filter rules may be ignored
https://bugzilla.samba.org/show_bug.cgi?id=5043 Summary: Qualified non-inherited filter rules may be ignored Product: rsync Version: 2.6.9 Platform: x64 OS/Version: Linux Status: NEW Severity: normal Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy:
2017 Oct 31
2
[Bug 13112] New: receive_xattr heap overread with non null terminated name and xattr filter
...====== ==3497==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000e831 at pc 0x7ffff6edc15b bp 0x7fffffff9990 sp 0x7fffffff9138 READ of size 2 at 0x60200000e831 thread T0 #0 0x7ffff6edc15a in strlen (/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/libasan.so.2+0x7015a) #1 0x4412dd in rule_matches /home/raj/rsync/rsync/exclude.c:696 #2 0x441921 in check_filter /home/raj/rsync/rsync/exclude.c:772 #3 0x441724 in name_is_excluded /home/raj/rsync/rsync/exclude.c:744 #4 0x4a2d76 in receive_xattr /home/raj/rsync/rsync/xattrs.c:835 #5 0x40beac in recv_file_entry /home/raj/rsync/rsyn...
2005 Jan 31
1
[patch] add "--ignore" option
...if (ent->match_flags & MATCHFLG_PERDIR_MERGE) { - int rc = check_filter(ent->u.mergelist, name, - name_is_dir); - if (rc) + enum matchtype rc = check_filter(ent->u.mergelist, name, + name_is_dir); + if (rc != M_NOMATCH) return rc; continue; } if (rule_matches(name, ent, name_is_dir)) { report_filter_result(name, ent, name_is_dir, listp->debug_type); - return ent->match_flags & MATCHFLG_INCLUDE ? 1 : -1; + if (ent->match_flags & MATCHFLG_INCLUDE) + return M_INCLUDE; + if (ent->match_flags & MATCHFLG_IGNORE...