瀏覽代碼

Make sure that the layer exists prior to store it

Guillaume J. Charmes 12 年之前
父節點
當前提交
be9dd7b85f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      graph.go

+ 1 - 1
graph.go

@@ -113,7 +113,7 @@ func (graph *Graph) Create(layerData Archive, container *Container, comment, aut
 		img.Container = container.Id
 		img.ContainerConfig = *container.Config
 	}
-	if err := graph.Register(layerData, true, img); err != nil {
+	if err := graph.Register(layerData, layerData != nil, img); err != nil {
 		return nil, err
 	}
 	go img.Checksum()