summaryrefslogtreecommitdiff
path: root/libpod/container_path_resolution.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-30 08:35:07 -0400
committerGitHub <noreply@github.com>2021-09-30 08:35:07 -0400
commitd8bdbf5b66c860a73f5d4e301535c0ee40d8d719 (patch)
treeee5e4c6705632064406f49147d2e5fb51947d300 /libpod/container_path_resolution.go
parentf0ae84f5120f7ec8d2fc16c6ae9e52725b5d4958 (diff)
parent855746cc9258b85d390d68cd3c61ca0588dd0f8f (diff)
downloadpodman-d8bdbf5b66c860a73f5d4e301535c0ee40d8d719.tar.gz
podman-d8bdbf5b66c860a73f5d4e301535c0ee40d8d719.tar.bz2
podman-d8bdbf5b66c860a73f5d4e301535c0ee40d8d719.zip
Merge pull request #11792 from mheon/340_final
Backports + release notes for v3.4.0 final
Diffstat (limited to 'libpod/container_path_resolution.go')
-rw-r--r--libpod/container_path_resolution.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpod/container_path_resolution.go b/libpod/container_path_resolution.go
index ec7306ca1..bb2ef1a73 100644
--- a/libpod/container_path_resolution.go
+++ b/libpod/container_path_resolution.go
@@ -112,7 +112,7 @@ func (c *Container) resolvePath(mountPoint string, containerPath string) (string
func findVolume(c *Container, containerPath string) (*Volume, error) {
runtime := c.Runtime()
cleanedContainerPath := filepath.Clean(containerPath)
- for _, vol := range c.Config().NamedVolumes {
+ for _, vol := range c.config.NamedVolumes {
if cleanedContainerPath == filepath.Clean(vol.Dest) {
return runtime.GetVolume(vol.Name)
}
@@ -124,7 +124,7 @@ func findVolume(c *Container, containerPath string) (*Volume, error) {
// Volume's destination.
func isPathOnVolume(c *Container, containerPath string) bool {
cleanedContainerPath := filepath.Clean(containerPath)
- for _, vol := range c.Config().NamedVolumes {
+ for _, vol := range c.config.NamedVolumes {
if cleanedContainerPath == filepath.Clean(vol.Dest) {
return true
}
@@ -141,7 +141,7 @@ func isPathOnVolume(c *Container, containerPath string) bool {
// path of a Mount. Returns a matching Mount or nil.
func findBindMount(c *Container, containerPath string) *specs.Mount {
cleanedPath := filepath.Clean(containerPath)
- for _, m := range c.Config().Spec.Mounts {
+ for _, m := range c.config.Spec.Mounts {
if m.Type != "bind" {
continue
}
@@ -157,7 +157,7 @@ func findBindMount(c *Container, containerPath string) *specs.Mount {
// Mount's destination.
func isPathOnBindMount(c *Container, containerPath string) bool {
cleanedContainerPath := filepath.Clean(containerPath)
- for _, m := range c.Config().Spec.Mounts {
+ for _, m := range c.config.Spec.Mounts {
if cleanedContainerPath == filepath.Clean(m.Destination) {
return true
}