Fix ReadAll to run on Windows.
filepath.Clean converts filenames to filenames with native path separators. Use ToSlash to normalize. Signed-off-by: Anusha Ragunathan <anusha@docker.com> Upstream-commit: 691555fc8b070a40d3e35922fda681394bdfa173 Component: engine
This commit is contained in:
@ -25,6 +25,7 @@ func ReadAll(reader io.ReadCloser) ([]string, error) {
|
||||
continue
|
||||
}
|
||||
pattern = filepath.Clean(pattern)
|
||||
pattern = filepath.ToSlash(pattern)
|
||||
excludes = append(excludes, pattern)
|
||||
}
|
||||
if err := scanner.Err(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user