Return error for utils.Matches in archive

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)
Upstream-commit: 8891e912b44c4ff597f7a45658c4d3030d730c98
Component: engine
This commit is contained in:
Michael Crosby
2014-07-31 15:11:15 -07:00
parent 604012d742
commit 88915cec66

View File

@ -352,8 +352,9 @@ func TarWithOptions(srcPath string, options *TarOptions) (io.ReadCloser, error)
skip, err := utils.Matches(relFilePath, options.Excludes)
if err != nil {
utils.Debugf("Error matching %s\n", relFilePath, err)
return nil
return err
}
if skip {
if f.IsDir() {
return filepath.SkipDir