Skip to content

Commit

Permalink
fix: mounting in transfer containers
Browse files Browse the repository at this point in the history
  • Loading branch information
rangoo94 committed Aug 8, 2024
1 parent 120eae7 commit 87f29f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/testworkflows/testworkflowprocessor/stage/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,10 @@ func (c *container) HasVolumeAt(path string) bool {
absPath = filepath.Join(c.WorkingDir(), path)
}
mounts := c.VolumeMounts()
absPath = filepath.Clean(absPath)
for _, mount := range mounts {
if strings.HasPrefix(filepath.Clean(absPath), filepath.Clean(mount.MountPath)+"/") {
mountPath := filepath.Clean(mount.MountPath)
if absPath == mountPath || strings.HasPrefix(absPath, mountPath+"/") {
return true
}
}
Expand Down

0 comments on commit 87f29f8

Please sign in to comment.