]> git.feebdaed.xyz Git - 0xmirror/podman.git/commit
libpod: simplify resolveWorkDir()
authorPaul Holzinger <pholzing@redhat.com>
Wed, 3 Dec 2025 18:15:24 +0000 (19:15 +0100)
committerPaul Holzinger <pholzing@redhat.com>
Thu, 4 Dec 2025 14:25:49 +0000 (15:25 +0100)
commitd18e44e9abb3bf5b7294aa70806e1368fdddfdd0
treee97be4893655ba6d66662303004ae8d5090b63fa
parent7b1be7f17723c89a636a65bb6f06456bfb8e5156
libpod: simplify resolveWorkDir()

The code checks for isPathOnVolume and isPathOnMount so we can just use
the SecureJoin here directly to check for path existance.

Then instead of walking symlinks and trying to guess if they are on a
mount just assume if it is a link (path is different from the normal
joined one) then don't error out early and let the OCI runtime deal with
it. The runtime does produce a less readable error but it still fails
and we have much less fragile code.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
libpod/container_internal_common.go
test/e2e/run_working_dir_test.go