mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 00:15:44 +00:00
Replace deprecated PatternMatcher.Matches with MatchesResult
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
This commit is contained in:
parent
b294a92a25
commit
454a1dea45
1 changed files with 2 additions and 2 deletions
|
|
@ -1185,11 +1185,11 @@ func nTar(excludes []string, sources ...string) (io.ReadCloser, error) {
|
|||
// If name is absolute path, then it has to be containerfile outside of build context.
|
||||
// If not, we should check it for being excluded via pattern matcher.
|
||||
if !filepath.IsAbs(name) {
|
||||
excluded, err := pm.Matches(name)
|
||||
res, err := pm.MatchesResult(name)
|
||||
if err != nil {
|
||||
return fmt.Errorf("checking if %q is excluded: %w", name, err)
|
||||
}
|
||||
if excluded {
|
||||
if res.IsMatched() {
|
||||
// Note: filepath.SkipDir is not possible to use given .dockerignore semantics.
|
||||
// An exception to exclusions may include an excluded directory, therefore we
|
||||
// are required to visit all files. :(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue