mirror of
https://github.com/containers/podman.git
synced 2025-07-04 01:48:28 +08:00
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 <gscrivan@redhat.com>
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user