mirror of
https://github.com/docker/cli.git
synced 2026-01-15 07:40:57 +03:00
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> Upstream-commit: 6f7e8d1d7fb94c89dc3d886dd131173d58aa10f0 Component: engine