summaryrefslogtreecommitdiff
path: root/libpod/container_path_resolution.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-08 15:24:57 +0100
committerGitHub <noreply@github.com>2021-11-08 15:24:57 +0100
commit8de9950038b5a0582bfecfbe3a11427e6cfbfcfe (patch)
tree709651a3b890a52fe9ff4ebcdfec16b20395a9a5 /libpod/container_path_resolution.go
parent75023e94823d62856aa81bfee605a67907d91438 (diff)
parent9e78185e372b170922dfdad80cede6b351750bb0 (diff)
downloadpodman-8de9950038b5a0582bfecfbe3a11427e6cfbfcfe.tar.gz
podman-8de9950038b5a0582bfecfbe3a11427e6cfbfcfe.tar.bz2
podman-8de9950038b5a0582bfecfbe3a11427e6cfbfcfe.zip
Merge pull request #12211 from vrothberg/3.4-bz-2014149
[3.4] volumes: be more tolerant and fix infinite loop
Diffstat (limited to 'libpod/container_path_resolution.go')
-rw-r--r--libpod/container_path_resolution.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_path_resolution.go b/libpod/container_path_resolution.go
index bb2ef1a73..7db23b783 100644
--- a/libpod/container_path_resolution.go
+++ b/libpod/container_path_resolution.go
@@ -161,7 +161,7 @@ func isPathOnBindMount(c *Container, containerPath string) bool {
if cleanedContainerPath == filepath.Clean(m.Destination) {
return true
}
- for dest := m.Destination; dest != "/"; dest = filepath.Dir(dest) {
+ for dest := m.Destination; dest != "/" && dest != "."; dest = filepath.Dir(dest) {
if cleanedContainerPath == dest {
return true
}