Quellcode durchsuchen

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>
Akihiro Suda vor 4 Jahren
Ursprung
Commit
dd97134232
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      daemon/graphdriver/overlay2/overlay.go

+ 1 - 1
daemon/graphdriver/overlay2/overlay.go

@@ -678,7 +678,7 @@ func (d *Driver) isParent(id, parent string) bool {
 
 // ApplyDiff applies the new layer into a root
 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)
 	}