docker: reword FromSlash(hostPath) comment

This commit is contained in:
Michael Schurter 2019-08-12 14:38:31 -07:00
parent 92ce8a0a49
commit 83dbac65b2
1 changed files with 4 additions and 3 deletions

View File

@ -236,9 +236,10 @@ func parseVolumeSpecWindows(volBind string) (hostPath string, containerPath stri
if len(parts) < 2 {
return "", "", "", fmt.Errorf("not <src>:<destination> format")
}
// In order to be OS agnostic, the host mount path should support either forward or backward slash.
// These will later to converted to OS specific slash in the agent side
// Convert host mount path separators to match the host OS's separator
// so that relative paths are supported cross-platform regardless of
// what slash is used in the jobspec.
hostPath = filepath.FromSlash(parts[0])
containerPath = parts[1]