From 6c56f917d3facec1438d03712f8a26d929fbe5ea Mon Sep 17 00:00:00 2001 From: John Howard Date: Tue, 1 Sep 2015 18:50:41 -0700 Subject: [PATCH] Windows: Ensure workdir handled in platform semantics Signed-off-by: John Howard --- daemon/daemon.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/daemon/daemon.go b/daemon/daemon.go index d55923d30b..cb538f4bec 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -1084,8 +1084,11 @@ func (daemon *Daemon) verifyContainerSettings(hostConfig *runconfig.HostConfig, // First perform verification of settings common across all platforms. if config != nil { - if config.WorkingDir != "" && !system.IsAbs(config.WorkingDir) { - return nil, fmt.Errorf("The working directory '%s' is invalid. It needs to be an absolute path.", config.WorkingDir) + if config.WorkingDir != "" { + config.WorkingDir = filepath.FromSlash(config.WorkingDir) // Ensure in platform semantics + if !system.IsAbs(config.WorkingDir) { + return nil, fmt.Errorf("The working directory '%s' is invalid. It needs to be an absolute path.", config.WorkingDir) + } } }