mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
f3d08d59aa
- Remove the windowsparser.HasResource() override, as it was the same on both Windows and Linux - Move the rxLCOWDestination to the lcowParser code - Move the rwModes variable to a generic (non-platform-specific) file, as it's used both for the windowsParser and the linuxParser - Some minor formatting and linting changes Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
14 lines
394 B
Go
14 lines
394 B
Go
// +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))
|
|
}
|