From a4094530bc8b0d5fdbd8ad4ce9a136fe15ee7cee Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Sat, 25 Jun 2022 14:21:52 +0200 Subject: volume: drop TODO comment the two operations are equivalent since securejoin.SecureJoin() has solved the symlinks. Prefer the Lstat version though to make sure symlinks are never resolved and we do not end up using a path on the host. Signed-off-by: Giuseppe Scrivano --- libpod/container_internal.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/libpod/container_internal.go b/libpod/container_internal.go index fe2a19a4e..8112c9a59 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -1648,8 +1648,6 @@ func (c *Container) mountNamedVolume(v *ContainerNamedVolume, mountpoint string) } // Do a manual stat on the source directory to verify existence. // Skip the rest if it exists. - // TODO: Should this be stat or lstat? I'm using lstat because I - // think copy-up doesn't happen when the source is a link. srcStat, err := os.Lstat(srcDir) if err != nil { if os.IsNotExist(err) { -- cgit v1.2.3-54-g00ecf