moby/volume
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
..
drivers golangci-lint: update to v1.49.0 2022-09-26 11:58:07 +02:00
local Fix volume CreatedAt being altered on initialization 2023-01-03 17:55:26 +01:00
mounts volume: fix empty-lines (revive) 2022-09-30 23:59:30 +02:00
service Volume prune: only prune anonymous volumes by default 2022-10-05 23:50:01 +02:00
testutils linting: gosec: fix or suppress G112, G114 in test code 2022-09-06 15:11:42 +02:00
volume.go Move mount parsing to separate package. 2018-04-19 06:35:54 -04:00