moby/volume/local
Sebastiaan van Stijn 01fd23b625
Fix volume CreatedAt being altered on initialization
The CreatedAt date was determined from the volume's `_data`
directory (`/var/lib/docker/volumes/<volumename>/_data`).
However, when initializing a volume, this directory is updated,
causing the date to change.

Instead of using the `_data` directory, use its parent directory,
which is not updated afterwards, and should reflect the time that
the volume was created.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-01-03 16:57:04 +01:00
..
local.go volume: use strings.Cut() and minor refactor 2022-12-21 11:09:00 +01:00
local_linux_test.go volume/local.Create(): validate early 2022-06-03 00:34:21 +02:00
local_test.go volume: fix empty-lines (revive) 2022-09-28 01:58:50 +02:00
local_unix.go Fix volume CreatedAt being altered on initialization 2023-01-03 16:57:04 +01:00
local_windows.go Fix volume CreatedAt being altered on initialization 2023-01-03 16:57:04 +01:00