mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
6f7e8d1d7f
As is seem in the comment of `normaliseWorkdir` for windows: ``` ... // WORKDIR c:\\foo --> C:\foo // WORKDIR \\foo --> C:\foo ... ``` However, this is not the case in the current implementation because `filepath.FromSlash` is used and `FromSlash` does not replace multiple separator with a single one (`file.Clean` does). So `normaliseWorkdir` does not truly normalize workdir. This fix changes the implementation of `normaliseWorkdir` and use `filepath.Clean` instead of `filepath.FromSlash`. Additional test cases have been added to the unit test. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> |
||
---|---|---|
.. | ||
dockerfile | ||
dockerignore | ||
builder.go | ||
context.go | ||
context_test.go | ||
context_unix.go | ||
context_windows.go | ||
dockerignore.go | ||
dockerignore_test.go | ||
git.go | ||
remote.go | ||
remote_test.go | ||
tarsum.go | ||
tarsum_test.go | ||
utils_test.go |