summaryrefslogtreecommitdiff
path: root/libarchive/archive_match.c
Commit message (Collapse)AuthorAgeFilesLines
* non-recursive extract and listPatrick Ohly2019-04-151-1/+30
| | | | | | | | | | | | | | | | | Sometimes it makes sense to extract or list a directory contained in an archive without also doing the same for the content of the directory, i.e. allowing -n (= --no-recursion) in combination with the x and t modes. bsdtar uses the match functionality in libarchive to track include matches. A new libarchive API call archive_match_set_inclusion_recursion() gets introduced to influence the matching behavior, with the default behavior as before. Non-recursive matching can be achieved by anchoring the path match at both start and end. Asking for a directory which itself isn't in the archive when in non-recursive mode is an error and handled by the existing mechanism for tracking unused inclusion entries.
* Don't #undef stat and #define stat(). stat is one of those unfortunateJoel Uckelman2018-10-181-1/+1
| | | | | | | | | identifiers for which there is both a struct and a function. MinGW uses a #define for setting struct stat to be the right struct, so doing #undef stat to clear the way for a #define for stat() the function inadvertantly clobbers the selected stat struct. To avoid this, we define la_stat() to _la_stat on Windows and stat() elsewhere, and then use la_stat() instead of stat().
* Match archive.h for la_int64_t vs int64_tJoerg Sonnenberger2017-10-071-2/+2
|
* Spelling fixesGraham Percival2016-12-271-6/+6
| | | | Sponsored by: Tarsnap Backup Inc.
* Fix a couple of typographical errors.Peter Pentchev2016-07-071-1/+1
|
* Forward declare __archive_get_date in a dedicated internal headerBrad King2015-10-261-1/+1
| | | | | | Avoid repeating the signature declaration in every source that uses it. While at it, constify internal __archive_get_date implementation to keep signatures consistent.
* Issue 327: tar should accept zero-sized exclude files with -XTim Kientzle2015-01-101-2/+7
| | | | | | | | | Key problem: We were using archive_read_format_raw() to read the exclude file which does not accept empty files. Enabling archive_read_format_empty() and reworking the end-of-input handling fixed this. Also add a test for this case to prevent it from regressing.
* Use correct variable types for ASCII Windows functions.Maurus Cuelenaere2013-09-161-1/+1
| | | | | There are both an ASCII and an Unicode variant for most of the Win32 API. Fix some inconsistent uses.
* Fix warning about unused variable triggered when not building on WIN32.Andres Mejia2013-02-071-0/+2
|
* Fix build failure on Win64.Michihiro NAKAJIMA2012-11-071-1/+1
|
* Fix a possibility of memory leaks when realloc fails.Michihiro NAKAJIMA2012-09-181-2/+5
| | | | | | Do not assign the return value of realloc into the variable that has the original pointer because if realloc failed we will lose the chance to release the address.
* Enable an aggressive warning C4706 on MSVC.Michihiro NAKAJIMA2012-02-201-4/+4
|
* Fix build failure in aggressive warnings on msys.Michihiro NAKAJIMA2012-02-161-7/+8
|
* Slightly simplify time_excluded funtion and add a check of the time flagMichihiro NAKAJIMA2012-02-131-10/+10
| | | | into archive_match_exclude_entry().
* Introduce archive_match_exclude_pattern_from_file(_w) andMichihiro NAKAJIMA2012-02-121-0/+169
| | | | | | 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.
* Fix build failure with -Wcast-qual GCC option since it happend on FreeBSD ↵Michihiro NAKAJIMA2012-02-091-6/+6
| | | | current.
* Fix build failure with -Wshadow GCC option since it happend on FreeBSD current.Michihiro NAKAJIMA2012-02-091-12/+13
|
* Code quality:Michihiro NAKAJIMA2012-02-081-17/+44
| | | | | - Update comments. - Make variable names meaningful.
* Make archive_match_owner_exclude fast by sorting id list.Michihiro NAKAJIMA2012-02-081-7/+28
|
* Seperate internal functions set_timefilter_pathname* into Posix version andMichihiro NAKAJIMA2012-02-081-43/+51
| | | | | Windows version respectively. And this reduces redundancy code at the Posix version of those functions.
* Rename an internal function name from set_time_str to set_timefilter_date.Michihiro NAKAJIMA2012-02-081-6/+8
|
* Always overwrite comparson conditions if the pathname is the sameMichihiro NAKAJIMA2012-02-081-17/+9
|
* Rename archive_matching to archive_match.Michihiro NAKAJIMA2012-02-081-0/+1615