686be57d0a
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
15 lines
432 B
Go
15 lines
432 B
Go
//go:build linux || freebsd || darwin
|
|
// +build linux freebsd darwin
|
|
|
|
package mounts // import "github.com/docker/docker/volume/mounts"
|
|
|
|
import (
|
|
"fmt"
|
|
"path/filepath"
|
|
"strings"
|
|
)
|
|
|
|
func (p *linuxParser) HasResource(m *MountPoint, absolutePath string) bool {
|
|
relPath, err := filepath.Rel(m.Destination, absolutePath)
|
|
return err == nil && relPath != ".." && !strings.HasPrefix(relPath, fmt.Sprintf("..%c", filepath.Separator))
|
|
}
|