moby/volume/local
Sebastiaan van Stijn fe097e018c
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>
(cherry picked from commit 01fd23b625)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-03 17:55:26 +01:00
..
local.go volume/local.New(): extract loading options to a function 2022-06-03 00:34:29 +02: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-30 23:59:30 +02:00
local_unix.go Fix volume CreatedAt being altered on initialization 2023-01-03 17:55:26 +01:00
local_windows.go Fix volume CreatedAt being altered on initialization 2023-01-03 17:55:26 +01:00