MCPcopy
hub / github.com/docker/compose / checkIfPathAlreadyBindMounted

Function checkIfPathAlreadyBindMounted

pkg/compose/watch.go:436–446  ·  pkg/compose/watch.go::checkIfPathAlreadyBindMounted
(watchPath string, volumes []types.ServiceVolumeConfig)

Source from the content-addressed store, hash-verified

434}
435
436func checkIfPathAlreadyBindMounted(watchPath string, volumes []types.ServiceVolumeConfig) bool {
437 for _, volume := range volumes {
438 if volume.Bind != nil {
439 relPath, err := filepath.Rel(volume.Source, watchPath)
440 if err == nil && !strings.HasPrefix(relPath, "..") {
441 return true
442 }
443 }
444 }
445 return false
446}
447
448type tarDockerClient struct {
449 s *composeService

Callers 2

watchMethod · 0.85
initialSyncFilesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected