mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix test file paths
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
7f7950aa18
commit
1847641b7b
1 changed files with 9 additions and 0 deletions
|
@ -86,6 +86,15 @@ func init() {
|
|||
dockerBasePath = info.DockerRootDir
|
||||
volumesConfigPath = filepath.Join(dockerBasePath, "volumes")
|
||||
containerStoragePath = filepath.Join(dockerBasePath, "containers")
|
||||
// Make sure in context of daemon, not the local platform. Note we can't
|
||||
// use filepath.FromSlash or ToSlash here as they are a no-op on Unix.
|
||||
if daemonPlatform == "windows" {
|
||||
volumesConfigPath = strings.Replace(volumesConfigPath, `/`, `\`, -1)
|
||||
containerStoragePath = strings.Replace(containerStoragePath, `/`, `\`, -1)
|
||||
} else {
|
||||
volumesConfigPath = strings.Replace(volumesConfigPath, `\`, `/`, -1)
|
||||
containerStoragePath = strings.Replace(containerStoragePath, `\`, `/`, -1)
|
||||
}
|
||||
}
|
||||
|
||||
// Daemon represents a Docker daemon for the testing framework.
|
||||
|
|
Loading…
Reference in a new issue