mirror of
https://github.com/containers/podman.git
synced 2025-10-20 04:34:01 +08:00

When we do path completion in images a user could try to complete a simple relative path, e.g. podman run $IMAGE e... should complete to etc if this path exists in the image. Right now we panic in this case as the current check didn't account for an empty string in simplePathJoinUnix(). In such a case return the path directly because we can not alter what the user typed on the cli and must return a path without slash as well in order for the shell to suggest the completion. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2209809 Signed-off-by: Paul Holzinger <pholzing@redhat.com>