Signed-off-by: Simon Ferquel <simon.ferquel@docker.com> Upstream-commit: e89b6e8c2d2c36c43f22aeaf2a885646c2994051 Component: engine
19 lines
447 B
Go
19 lines
447 B
Go
// +build linux freebsd darwin solaris
|
|
|
|
package volume
|
|
|
|
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))
|
|
}
|
|
|
|
func (p *windowsParser) HasResource(m *MountPoint, absolutePath string) bool {
|
|
return false
|
|
}
|