Merge pull request #28006 from dmcgowan/clean-overlay2-layerstore

Cleanup invalid code in overlay2 and layer store
This commit is contained in:
Vincent Demeester 2016-11-02 23:16:38 -07:00 committed by GitHub
commit 1f4137857f
2 changed files with 5 additions and 2 deletions

View File

@ -412,7 +412,7 @@ func (d *Driver) getLowerDirs(id string) ([]string, error) {
if err != nil {
return nil, err
}
lowersArray = append(lowersArray, path.Clean(path.Join(d.home, "link", lp)))
lowersArray = append(lowersArray, path.Clean(path.Join(d.home, linkDir, lp)))
}
} else if !os.IsNotExist(err) {
return nil, err

View File

@ -24,7 +24,10 @@ func (el *emptyLayer) TarStream() (io.ReadCloser, error) {
return ioutil.NopCloser(buf), nil
}
func (el *emptyLayer) TarStreamFrom(ChainID) (io.ReadCloser, error) {
func (el *emptyLayer) TarStreamFrom(p ChainID) (io.ReadCloser, error) {
if p == "" {
return el.TarStream()
}
return nil, fmt.Errorf("can't get parent tar stream of an empty layer")
}