-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
filepath.Clean
in normaliseWorkdir
for windows
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 <[email protected]>
- Loading branch information
Showing
2 changed files
with
32 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters