They were not so helpful than I though at archive_read_disk.
Rename archive_matching_path_excluded_ae to archive_matching_path_excluded.
Rename archive_matching_time_excluded_ae to archive_matching_time_excluded.
Rename archive_matching_owner_excluded_ae to archive_matching_owner_excluded.
Rename archive_matching_excluded_ae to archive_matching_excluded.
SVN-Revision: 4178
lafe_errc(1, archive_errno(a),
"%s", archive_error_string(a));
}
- if (archive_matching_path_excluded_ae(cpio->matching, entry))
+ if (archive_matching_path_excluded(cpio->matching, entry))
continue;
if (cpio->option_rename) {
destpath = cpio_rename(archive_entry_pathname(entry));
lafe_errc(1, archive_errno(a),
"%s", archive_error_string(a));
}
- if (archive_matching_path_excluded_ae(cpio->matching, entry))
+ if (archive_matching_path_excluded(cpio->matching, entry))
continue;
if (cpio->verbose)
list_item_verbose(cpio, entry);
/*
* Test if archive_entry is excluded.
* This is a convenience function. This is the same as calling all
- * archive_matching_path_excluded_ae, archive_matching_time_excluded_ae
- * and archive_matching_owner_excluded_ae.
+ * archive_matching_path_excluded, archive_matching_time_excluded
+ * and archive_matching_owner_excluded.
*/
-__LA_DECL int archive_matching_excluded_ae(struct archive *,
+__LA_DECL int archive_matching_excluded(struct archive *,
struct archive_entry *);
/*
- * Test if filename is excluded. The conditions are set by following functions.
+ * Test if pathname is excluded. The conditions are set by following functions.
*/
__LA_DECL int archive_matching_path_excluded(struct archive *,
- const char *_filename);
-__LA_DECL int archive_matching_path_excluded_w(struct archive *,
- const wchar_t *_filename);
-__LA_DECL int archive_matching_path_excluded_ae(struct archive *,
struct archive_entry *);
-/* Add exclusion fielname pattern. */
+/* Add exclusion pathname pattern. */
__LA_DECL int archive_matching_exclude_pattern(struct archive *,
const char *);
__LA_DECL int archive_matching_exclude_pattern_w(struct archive *,
const wchar_t *);
-/* Add inclusion fielname pattern. */
+/* Add inclusion pathname pattern. */
__LA_DECL int archive_matching_include_pattern(struct archive *,
const char *);
__LA_DECL int archive_matching_include_pattern_w(struct archive *,
* Test if a file is excluded by its time stamp.
* The conditions are set by following functions.
*/
-__LA_DECL int archive_matching_time_excluded_ae(struct archive *,
+__LA_DECL int archive_matching_time_excluded(struct archive *,
struct archive_entry *);
/* Set inclusion file times. */
__LA_DECL int archive_matching_newer_mtime(struct archive *,
* Test if a file is excluded by its uid ,gid, uname or gname.
* The conditions are set by following functions.
*/
-__LA_DECL int archive_matching_owner_excluded_ae(struct archive *,
+__LA_DECL int archive_matching_owner_excluded(struct archive *,
struct archive_entry *);
/* Add inclusion uid, gid, uname and gname. */
__LA_DECL int archive_matching_include_uid(struct archive *,
* Returns <0 if something error happened.
*/
int
-archive_matching_excluded_ae(struct archive *_a, struct archive_entry *entry)
+archive_matching_excluded(struct archive *_a, struct archive_entry *entry)
{
struct archive_matching *a;
int r;
* Returns <0 if something error happened.
*/
int
-archive_matching_path_excluded(struct archive *_a, const char *pathname)
-{
- struct archive_matching *a;
-
- archive_check_magic(_a, ARCHIVE_MATCHING_MAGIC,
- ARCHIVE_STATE_NEW, "archive_matching_path_excluded");
-
- if (pathname == NULL || *pathname == L'\0')
- return (0);
- a = (struct archive_matching *)_a;
-
- /* If we don't have exclusion/inclusion pattern set at all,
- * the pathname is always not excluded. */
- if ((a->setflag & PATTERN_IS_SET) == 0)
- return (0);
- return (path_excluded(a, 1, pathname));
-}
-
-int
-archive_matching_path_excluded_w(struct archive *_a, const wchar_t *pathname)
-{
- struct archive_matching *a;
-
- archive_check_magic(_a, ARCHIVE_MATCHING_MAGIC,
- ARCHIVE_STATE_NEW, "archive_matching_path_excluded_w");
-
- if (pathname == NULL || *pathname == L'\0')
- return (0);
- a = (struct archive_matching *)_a;
-
- /* If we don't have exclusion/inclusion pattern set at all,
- * the pathname is always not excluded. */
- if ((a->setflag & PATTERN_IS_SET) == 0)
- return (0);
- return (path_excluded(a, 0, pathname));
-}
-
-int
-archive_matching_path_excluded_ae(struct archive *_a,
+archive_matching_path_excluded(struct archive *_a,
struct archive_entry *entry)
{
struct archive_matching *a;
archive_check_magic(_a, ARCHIVE_MATCHING_MAGIC,
- ARCHIVE_STATE_NEW, "archive_matching_path_excluded_ae");
+ ARCHIVE_STATE_NEW, "archive_matching_path_excluded");
a = (struct archive_matching *)_a;
if (entry == NULL) {
* Returns <0 if something error happened.
*/
int
-archive_matching_time_excluded_ae(struct archive *_a,
+archive_matching_time_excluded(struct archive *_a,
struct archive_entry *entry)
{
struct archive_matching *a;
* Returns <0 if something error happened.
*/
int
-archive_matching_owner_excluded_ae(struct archive *_a,
+archive_matching_owner_excluded(struct archive *_a,
struct archive_entry *entry)
{
struct archive_matching *a;
* Perform path matching.
*/
if (a->matching) {
- r = archive_matching_path_excluded(a->matching,
- tree_current_path(t));
+ r = archive_matching_path_excluded(a->matching, entry);
if (r < 0) {
archive_set_error(&(a->archive), errno,
"Faild : %s", archive_error_string(a->matching));
* Perform time matching.
*/
if (a->matching) {
- r = archive_matching_time_excluded_ae(a->matching, entry);
+ r = archive_matching_time_excluded(a->matching, entry);
if (r < 0) {
archive_set_error(&(a->archive), errno,
"Faild : %s", archive_error_string(a->matching));
* Perform owner matching.
*/
if (a->matching) {
- r = archive_matching_owner_excluded_ae(a->matching, entry);
+ r = archive_matching_owner_excluded(a->matching, entry);
if (r < 0) {
archive_set_error(&(a->archive), errno,
"Faild : %s", archive_error_string(a->matching));
* Perform path matching.
*/
if (a->matching) {
- r = archive_matching_path_excluded_w(a->matching,
- tree_current_path(t));
+ r = archive_matching_path_excluded(a->matching, entry);
if (r < 0) {
archive_set_error(&(a->archive), errno,
"Faild : %s", archive_error_string(a->matching));
* Perform time matching.
*/
if (a->matching) {
- r = archive_matching_time_excluded_ae(a->matching, entry);
+ r = archive_matching_time_excluded(a->matching, entry);
if (r < 0) {
archive_set_error(&(a->archive), errno,
"Faild : %s", archive_error_string(a->matching));
* Perform owner matching.
*/
if (a->matching) {
- r = archive_matching_owner_excluded_ae(a->matching, entry);
+ r = archive_matching_owner_excluded(a->matching, entry);
if (r < 0) {
archive_set_error(&(a->archive), errno,
"Faild : %s", archive_error_string(a->matching));
archive_entry_set_uid(ae, 0);
failure("uid 0 should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_uid(ae, 1000);
failure("uid 1000 should not be excluded");
- assertEqualInt(0, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_set_uid(ae, 1001);
failure("uid 1001 should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_uid(ae, 1002);
failure("uid 1002 should not be excluded");
- assertEqualInt(0, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_set_uid(ae, 1003);
failure("uid 1003 should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Clean up. */
archive_entry_free(ae);
archive_entry_set_gid(ae, 0);
failure("uid 0 should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_gid(ae, 1000);
failure("uid 1000 should not be excluded");
- assertEqualInt(0, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_set_gid(ae, 1001);
failure("uid 1001 should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_gid(ae, 1002);
failure("uid 1002 should not be excluded");
- assertEqualInt(0, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_set_gid(ae, 1003);
failure("uid 1003 should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Clean up. */
archive_entry_free(ae);
archive_entry_copy_uname(ae, "unknown");
failure("User 'unknown' should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_copy_uname(ae, "foo");
failure("User 'foo' should not be excluded");
- assertEqualInt(0, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_copy_uname(ae, "foo1");
failure("User 'foo1' should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_copy_uname(ae, "bar");
failure("User 'bar' should not be excluded");
- assertEqualInt(0, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_copy_uname(ae, "bar1");
failure("User 'bar1' should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Clean up. */
archive_entry_free(ae);
archive_entry_copy_uname_w(ae, L"unknown");
failure("User 'unknown' should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_copy_uname_w(ae, L"foo");
failure("User 'foo' should not be excluded");
- assertEqualInt(0, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_copy_uname_w(ae, L"foo1");
failure("User 'foo1' should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_copy_uname_w(ae, L"bar");
failure("User 'bar' should not be excluded");
- assertEqualInt(0, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_copy_uname_w(ae, L"bar1");
failure("User 'bar1' should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Clean up. */
archive_entry_free(ae);
archive_entry_copy_gname(ae, "unknown");
failure("Group 'unknown' should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_copy_gname(ae, "foo");
failure("Group 'foo' should not be excluded");
- assertEqualInt(0, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_copy_gname(ae, "foo1");
failure("Group 'foo1' should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_copy_gname(ae, "bar");
failure("Group 'bar' should not be excluded");
- assertEqualInt(0, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_copy_gname(ae, "bar1");
failure("Group 'bar1' should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Clean up. */
archive_entry_free(ae);
archive_entry_copy_gname_w(ae, L"unknown");
failure("Group 'unknown' should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_copy_gname_w(ae, L"foo");
failure("Group 'foo' should not be excluded");
- assertEqualInt(0, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_copy_gname_w(ae, L"foo1");
failure("Group 'foo1' should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_copy_gname_w(ae, L"bar");
failure("Group 'bar' should not be excluded");
- assertEqualInt(0, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_copy_gname_w(ae, L"bar1");
failure("Group 'bar1' should be excluded");
- assertEqualInt(1, archive_matching_owner_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_owner_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Clean up. */
archive_entry_free(ae);
assertEqualIntA(m, 0, archive_matching_exclude_pattern(m, "^aa*"));
/* Test with 'aa1234', which should be excluded. */
- failure("'aa1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded(m, "aa1234"));
- failure("'aa1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded_w(m, L"aa1234"));
archive_entry_copy_pathname(ae, "aa1234");
failure("'aa1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_path_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
+ archive_entry_clear(ae);
+ archive_entry_copy_pathname_w(ae, L"aa1234");
+ failure("'aa1234' should be excluded");
+ assertEqualInt(1, archive_matching_path_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Test with 'a1234', which should not be excluded. */
- failure("'a1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded(m, "a1234"));
- failure("'a1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded_w(m, L"a1234"));
archive_entry_copy_pathname(ae, "a1234");
failure("'a1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_path_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
+ archive_entry_clear(ae);
+ archive_entry_copy_pathname_w(ae, L"a1234");
+ failure("'a1234' should not be excluded");
+ assertEqualInt(0, archive_matching_path_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
/* Clean up. */
archive_entry_free(ae);
assertEqualIntA(m, 0, archive_matching_exclude_pattern_w(m, L"^aa*"));
/* Test with 'aa1234', which should be excluded. */
- failure("'aa1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded(m, "aa1234"));
- failure("'aa1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded_w(m, L"aa1234"));
archive_entry_copy_pathname(ae, "aa1234");
failure("'aa1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_path_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
+ archive_entry_clear(ae);
+ archive_entry_copy_pathname_w(ae, L"aa1234");
+ failure("'aa1234' should be excluded");
+ assertEqualInt(1, archive_matching_path_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Test with 'a1234', which should not be excluded. */
- failure("'a1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded(m, "a1234"));
- failure("'a1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded_w(m, L"a1234"));
archive_entry_copy_pathname(ae, "a1234");
failure("'a1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_path_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
+ archive_entry_clear(ae);
+ archive_entry_copy_pathname_w(ae, L"a1234");
+ failure("'a1234' should not be excluded");
+ assertEqualInt(0, archive_matching_path_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
/* Clean up. */
archive_entry_free(ae);
assertEqualIntA(m, 0, archive_matching_include_pattern(m, "^aa*"));
/* Test with 'aa1234', which should not be excluded. */
- failure("'aa1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded(m, "aa1234"));
- failure("'aa1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded_w(m, L"aa1234"));
archive_entry_copy_pathname(ae, "aa1234");
failure("'aa1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_path_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
+ archive_entry_clear(ae);
+ archive_entry_copy_pathname_w(ae, L"aa1234");
+ failure("'aa1234' should not be excluded");
+ assertEqualInt(0, archive_matching_path_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
/* Test with 'a1234', which should be excluded. */
- failure("'a1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded(m, "a1234"));
- failure("'a1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded_w(m, L"a1234"));
archive_entry_copy_pathname(ae, "a1234");
failure("'a1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_path_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
+ archive_entry_clear(ae);
+ archive_entry_copy_pathname_w(ae, L"a1234");
+ failure("'a1234' should be excluded");
+ assertEqualInt(1, archive_matching_path_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify unmatched_inclusions. */
assertEqualInt(0, archive_matching_path_unmatched_inclusions(m));
assertEqualIntA(m, 0, archive_matching_include_pattern_w(m, L"^aa*"));
/* Test with 'aa1234', which should not be excluded. */
- failure("'aa1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded(m, "aa1234"));
- failure("'aa1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded_w(m, L"aa1234"));
archive_entry_copy_pathname(ae, "aa1234");
failure("'aa1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_path_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
+ archive_entry_clear(ae);
+ archive_entry_copy_pathname_w(ae, L"aa1234");
+ failure("'aa1234' should not be excluded");
+ assertEqualInt(0, archive_matching_path_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
/* Test with 'a1234', which should be excluded. */
- failure("'a1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded(m, "a1234"));
- failure("'a1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded_w(m, L"a1234"));
archive_entry_copy_pathname(ae, "a1234");
failure("'a1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_path_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
+ archive_entry_clear(ae);
+ archive_entry_copy_pathname_w(ae, L"a1234");
+ failure("'a1234' should be excluded");
+ assertEqualInt(1, archive_matching_path_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify unmatched_inclusions. */
assertEqualInt(0, archive_matching_path_unmatched_inclusions(m));
assertEqualIntA(m, 0, archive_matching_include_pattern(m, "^a1*"));
/* Test with 'aa1234', which should not be excluded. */
- failure("'aa1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded(m, "aa1234"));
- failure("'aa1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded_w(m, L"aa1234"));
archive_entry_copy_pathname(ae, "aa1234");
failure("'aa1234' should not be excluded");
- assertEqualInt(0, archive_matching_path_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_path_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
+ archive_entry_clear(ae);
+ archive_entry_copy_pathname_w(ae, L"aa1234");
+ failure("'aa1234' should not be excluded");
+ assertEqualInt(0, archive_matching_path_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
/* Test with 'aaa1234', which should be excluded. */
- failure("'aaa1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded(m, "aaa1234"));
- failure("'aaa1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded_w(m, L"aaa1234"));
archive_entry_copy_pathname(ae, "aaa1234");
failure("'aaa1234' should be excluded");
- assertEqualInt(1, archive_matching_path_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_path_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
+ archive_entry_clear(ae);
+ archive_entry_copy_pathname_w(ae, L"aaa1234");
+ failure("'aaa1234' should be excluded");
+ assertEqualInt(1, archive_matching_path_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify unmatched_inclusions. */
assertEqualInt(1, archive_matching_path_unmatched_inclusions(m));
archive_entry_set_mtime(ae, 7880, 0);
archive_entry_set_ctime(ae, 7880, 0);
failure("Both Its mtime and ctime should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7879, 999);
archive_entry_set_ctime(ae, 7879, 999);
failure("Both Its mtime and ctime should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7881, 0);
archive_entry_set_ctime(ae, 7881, 0);
failure("Both Its mtime and ctime should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7880, 1);
archive_entry_set_ctime(ae, 7880, 0);
failure("Its mtime should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7880, 0);
archive_entry_set_ctime(ae, 7880, 1);
failure("Its ctime should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Clean up. */
archive_entry_free(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify 'mid' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify 'new' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
/*
* Test 'newer ctime than'.
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify 'mid' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify 'new' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
assertChdir("..");
/* Clean up. */
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify 'mid' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify 'new' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
/*
* Test 'newer ctime than'.
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify 'mid' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify 'new' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
assertChdir("..");
/* Clean up. */
archive_entry_set_mtime(ae, 7880, 0);
archive_entry_set_ctime(ae, 7880, 0);
failure("Both Its mtime and ctime should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7879, 999);
archive_entry_set_ctime(ae, 7879, 999);
failure("Both Its mtime and ctime should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7881, 0);
archive_entry_set_ctime(ae, 7881, 0);
failure("Both Its mtime and ctime should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7880, 1);
archive_entry_set_ctime(ae, 7879, 0);
failure("Its mtime should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7879, 0);
archive_entry_set_ctime(ae, 7880, 1);
failure("Its ctime should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Clean up. */
archive_entry_free(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
/* Verify 'mid' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify 'new' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/*
* Test 'older ctime than'.
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
/* Verify 'mid' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify 'new' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
assertChdir("..");
/* Clean up. */
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
/* Verify 'mid' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify 'new' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/*
* Test 'older ctime than'.
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
/* Verify 'mid' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
/* Verify 'new' file. */
archive_entry_clear(ae);
assertEqualIntA(a, ARCHIVE_OK,
archive_read_disk_entry_from_file(a, ae, -1, NULL));
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
assertChdir("..");
/* Clean up. */
archive_entry_copy_pathname(ae, "file1");
archive_entry_set_mtime(ae, 7879, 999);
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7880, 0);
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7880, 1);
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_copy_pathname(ae, "file2");
archive_entry_set_mtime(ae, 7879, 999);
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7880, 0);
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7880, 1);
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_copy_pathname(ae, "file3");
archive_entry_set_mtime(ae, 7879, 999);
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7880, 0);
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7880, 1);
failure("It should be excluded");
- assertEqualInt(1, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(1, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(1, archive_matching_time_excluded(m, ae));
+ assertEqualInt(1, archive_matching_excluded(m, ae));
archive_entry_copy_pathname(ae, "file4");
archive_entry_set_mtime(ae, 7879, 999);
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7880, 0);
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
archive_entry_set_mtime(ae, 7880, 1);
failure("It should not be excluded");
- assertEqualInt(0, archive_matching_time_excluded_ae(m, ae));
- assertEqualInt(0, archive_matching_excluded_ae(m, ae));
+ assertEqualInt(0, archive_matching_time_excluded(m, ae));
+ assertEqualInt(0, archive_matching_excluded(m, ae));
/* Clean up. */
if (bsdtar->gname)
archive_entry_set_gname(entry, bsdtar->gname);
- /*
- * Exclude entries that are too old.
- */
- if (archive_matching_time_excluded_ae(bsdtar->matching, entry))
- continue; /* skip it. */
-
/*
* Note that pattern exclusions are checked before
* pathname rewrites are handled. This gives more
* rewrite, there would be no way to exclude foo1/bar
* while allowing foo2/bar.)
*/
- if (archive_matching_path_excluded_ae(bsdtar->matching,
- entry))
+ if (archive_matching_excluded(bsdtar->matching, entry))
continue; /* Excluded by a pattern test. */
if (mode == 't') {
int e;
while (ARCHIVE_OK == (e = archive_read_next_header(ina, &in_entry))) {
- if (archive_matching_time_excluded_ae(bsdtar->matching,
- in_entry))
- continue;
- if (archive_matching_path_excluded_ae(bsdtar->matching,
- in_entry))
+ if (archive_matching_excluded(bsdtar->matching, in_entry))
continue;
if (bsdtar->option_interactive &&
!yes("copy '%s'", archive_entry_pathname(in_entry)))