mirror of
https://github.com/containers/podman.git
synced 2025-12-07 22:32:46 +08:00
Merge pull request #10238 from bacher09/fix-inf-loop
Fix infinite loop in isPathOnVolume
This commit is contained in:
@@ -128,7 +128,7 @@ func isPathOnVolume(c *Container, containerPath string) bool {
|
||||
if cleanedContainerPath == filepath.Clean(vol.Dest) {
|
||||
return true
|
||||
}
|
||||
for dest := vol.Dest; dest != "/"; dest = filepath.Dir(dest) {
|
||||
for dest := vol.Dest; dest != "/" && dest != "."; dest = filepath.Dir(dest) {
|
||||
if cleanedContainerPath == dest {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user