mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
overlay2: call d.naiveDiff.ApplyDiff when useNaiveDiff==true
Previously, `d.naiveDiff.ApplyDiff` was not used even when `useNaiveDiff()==true` Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
parent
797b974cb9
commit
dd97134232
1 changed files with 1 additions and 1 deletions
|
@ -678,7 +678,7 @@ func (d *Driver) isParent(id, parent string) bool {
|
||||||
|
|
||||||
// ApplyDiff applies the new layer into a root
|
// ApplyDiff applies the new layer into a root
|
||||||
func (d *Driver) ApplyDiff(id string, parent string, diff io.Reader) (size int64, err error) {
|
func (d *Driver) ApplyDiff(id string, parent string, diff io.Reader) (size int64, err error) {
|
||||||
if !d.isParent(id, parent) {
|
if useNaiveDiff(d.home) || !d.isParent(id, parent) {
|
||||||
return d.naiveDiff.ApplyDiff(id, parent, diff)
|
return d.naiveDiff.ApplyDiff(id, parent, diff)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue