Skip to content

Commit 388f9a7

Browse files
committed
Add comment to reference the official docs
1 parent 80fea51 commit 388f9a7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

client/src/main/groovy/de/gesellix/docker/client/builder/GlobsMatcher.groovy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ class GlobsMatcher {
6161
static String separator = File.separatorChar
6262

6363
Matcher(FileSystem fileSystem, String pattern) {
64+
// According to https://docs.docker.com/engine/reference/builder/#dockerignore-file
65+
// and https://golang.org/pkg/path/filepath/#Clean we clean paths
66+
// by removing trailing slashes and also by replacing slashes with the path separator.
6467
this.pattern = pattern.replaceAll("/", "\\${separator}")
6568
.split("\\${separator}")
6669
.join("\\${separator}")

0 commit comments

Comments
 (0)