Fixed file modified time not changing on Windows
Signed-off-by: Darren Stahl <darst@microsoft.com>
This commit is contained in:
parent
c8e890aa4b
commit
c7478a100c
14 changed files with 401 additions and 32 deletions
|
@ -9,7 +9,6 @@ import (
|
|||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/docker/docker/pkg/pools"
|
||||
|
@ -167,8 +166,7 @@ func UnpackLayer(dest string, layer Reader) (size int64, err error) {
|
|||
|
||||
for _, hdr := range dirs {
|
||||
path := filepath.Join(dest, hdr.Name)
|
||||
ts := []syscall.Timespec{timeToTimespec(hdr.AccessTime), timeToTimespec(hdr.ModTime)}
|
||||
if err := syscall.UtimesNano(path, ts); err != nil {
|
||||
if err := system.Chtimes(path, hdr.AccessTime, hdr.ModTime); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue