diff --git a/volume/local/local.go b/volume/local/local.go index 29e3cc9a54..eb78814ab0 100644 --- a/volume/local/local.go +++ b/volume/local/local.go @@ -21,11 +21,11 @@ import ( "github.com/sirupsen/logrus" ) -// VolumeDataPathName is the name of the directory where the volume data is stored. -// It uses a very distinctive name to avoid collisions migrating data between -// Docker versions. const ( - VolumeDataPathName = "_data" + // volumeDataPathName is the name of the directory where the volume data is stored. + // It uses a very distinctive name to avoid collisions migrating data between + // Docker versions. + volumeDataPathName = "_data" volumesPathName = "volumes" ) @@ -127,7 +127,7 @@ func (r *Root) List() ([]volume.Volume, error) { // DataPath returns the constructed path of this volume. func (r *Root) DataPath(volumeName string) string { - return filepath.Join(r.path, volumeName, VolumeDataPathName) + return filepath.Join(r.path, volumeName, volumeDataPathName) } // Name returns the name of Root, defined in the volume package in the DefaultDriverName constant. diff --git a/volume/local/local_unix.go b/volume/local/local_unix.go index 4fdd182544..3ef2db40c3 100644 --- a/volume/local/local_unix.go +++ b/volume/local/local_unix.go @@ -24,8 +24,6 @@ import ( ) var ( - oldVfsDir = filepath.Join("vfs", "dir") - validOpts = map[string]struct{}{ "type": {}, // specify the filesystem type for mount, e.g. nfs "o": {}, // generic mount options @@ -53,16 +51,9 @@ func (o *optsConfig) String() string { // scopedPath verifies that the path where the volume is located // is under Docker's root and the valid local paths. func (r *Root) scopedPath(realPath string) bool { - // Volumes path for Docker version >= 1.7 if strings.HasPrefix(realPath, filepath.Join(r.scope, volumesPathName)) && realPath != filepath.Join(r.scope, volumesPathName) { return true } - - // Volumes path for Docker version < 1.7 - if strings.HasPrefix(realPath, filepath.Join(r.scope, oldVfsDir)) { - return true - } - return false }