summaryrefslogtreecommitdiff
path: root/tar/read.c
diff options
context:
space:
mode:
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>2012-02-12 22:41:47 +0900
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>2012-02-12 22:41:47 +0900
commitae314ad8180bbd1127834d299bfa761f566eac8c (patch)
tree5ffea4ff68225b79f5494906bb76f74fdc87725f /tar/read.c
parent75d9a70fc8ee5d4687f0ecd4186587cd281faa36 (diff)
downloadlibarchive-ae314ad8180bbd1127834d299bfa761f566eac8c.tar.gz
Introduce archive_match_exclude_pattern_from_file(_w) and
archive_match_include_pattern_from_file(_w) reading exclusion/inclusion patterns from a file. And so retire lafe_exclude_from_file() and lafe_include_from_file because we can use new APIs instead.
Diffstat (limited to 'tar/read.c')
-rw-r--r--tar/read.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tar/read.c b/tar/read.c
index 4fa6a547..676ea0aa 100644
--- a/tar/read.c
+++ b/tar/read.c
@@ -166,8 +166,11 @@ read_archive(struct bsdtar *bsdtar, char mode, struct archive *writer)
}
if (bsdtar->names_from_file != NULL)
- lafe_include_from_file(bsdtar->matching,
- bsdtar->names_from_file, bsdtar->option_null);
+ if (archive_match_include_pattern_from_file(
+ bsdtar->matching, bsdtar->names_from_file,
+ bsdtar->option_null) != ARCHIVE_OK)
+ lafe_errc(1, 0, "Error inclusion pattern: %s",
+ archive_error_string(bsdtar->matching));
a = archive_read_new();
if (bsdtar->compress_program != NULL)