Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
| ... | ... |
@@ -352,12 +352,13 @@ func ExportChanges(dir string, changes []Change) (Archive, error) {
|
| 352 | 352 |
whiteOutDir := filepath.Dir(change.Path) |
| 353 | 353 |
whiteOutBase := filepath.Base(change.Path) |
| 354 | 354 |
whiteOut := filepath.Join(whiteOutDir, ".wh."+whiteOutBase) |
| 355 |
+ timestamp := time.Now() |
|
| 355 | 356 |
hdr := &tar.Header{
|
| 356 | 357 |
Name: whiteOut[1:], |
| 357 | 358 |
Size: 0, |
| 358 |
- ModTime: time.Now(), |
|
| 359 |
- AccessTime: time.Now(), |
|
| 360 |
- ChangeTime: time.Now(), |
|
| 359 |
+ ModTime: timestamp, |
|
| 360 |
+ AccessTime: timestamp, |
|
| 361 |
+ ChangeTime: timestamp, |
|
| 361 | 362 |
} |
| 362 | 363 |
if err := tw.WriteHeader(hdr); err != nil {
|
| 363 | 364 |
utils.Debugf("Can't write whiteout header: %s\n", err)
|