From 691555fc8b070a40d3e35922fda681394bdfa173 Mon Sep 17 00:00:00 2001 From: Anusha Ragunathan Date: Thu, 4 Feb 2016 13:52:31 -0800 Subject: [PATCH] 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 --- builder/dockerignore/dockerignore.go | 1 + 1 file changed, 1 insertion(+) diff --git a/builder/dockerignore/dockerignore.go b/builder/dockerignore/dockerignore.go index 8170f1ecf1..1fed3199af 100644 --- a/builder/dockerignore/dockerignore.go +++ b/builder/dockerignore/dockerignore.go @@ -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 {