Windows: Fix dockerfile ADD from HTTP

Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 3715e60c71abbcc794a9ec9f95e06d7a5ae5ee30
Component: engine
This commit is contained in:
John Howard
2015-09-02 13:53:09 -07:00
parent e62c5d4ded
commit c4fcb79000

View File

@ -348,8 +348,11 @@ func calcCopyInfo(b *builder, cmdName string, cInfos *[]*copyInfo, origPath stri
}
}
if err := system.UtimesNano(tmpFileName, times); err != nil {
return err
// Windows does not support UtimesNano.
if runtime.GOOS != "windows" {
if err := system.UtimesNano(tmpFileName, times); err != nil {
return err
}
}
ci.origPath = filepath.Join(filepath.Base(tmpDirName), filepath.Base(tmpFileName))