Use clean path for map and comparison.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
@@ -374,7 +374,7 @@ func checkSelinuxLevel(level string) (bool, error) {
|
||||
// isInCRIMounts checks whether a destination is in CRI mount list.
|
||||
func isInCRIMounts(dst string, mounts []*runtime.Mount) bool {
|
||||
for _, m := range mounts {
|
||||
if m.ContainerPath == dst {
|
||||
if filepath.Clean(m.ContainerPath) == filepath.Clean(dst) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user