mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
42dba8c3f9
"docker load" validates parent links by comparing image histories, and the History struct has a time.Time member "Created". Time.UnmarshalJSON can read RFC3339 timestamps with offset "+00:00", but t.MarshalJSON writes them with offset "Z". Equivalent times in these two formats are not equal when compared with the == operator. This causes checkValidParent to incorrectly return false when the parent image history contains times using offset "+00:00". In that case the history copied to the child image will have been converted into "Z" form when marshaled out. This patch adds an "Equal" method to History, which compares "Created" times with t.Equal. This is used instead of reflect.DeepEqual in checkValidParent. Signed-off-by: Rob Cowsill <42620235+rcowsill@users.noreply.github.com> |
||
---|---|---|
.. | ||
cache | ||
spec | ||
tarexport | ||
v1 | ||
fs.go | ||
fs_test.go | ||
image.go | ||
image_test.go | ||
rootfs.go | ||
store.go | ||
store_test.go |