0033-Save-config-to-disk-if-images-s-name-is-removed.patch 933 字节
Newer Older
W
WangFengTu 已提交
1
From 882d8bb7734ff6eb15384aa8bbcb9d2ea1ecb04f Mon Sep 17 00:00:00 2001
D
dogsheng 已提交
2 3
From: WangFengTu <wangfengtu@huawei.com>
Date: Wed, 18 Dec 2019 07:29:06 -0500
W
WangFengTu 已提交
4
Subject: [PATCH 33/40] Save config to disk if images's name is removed
D
dogsheng 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

Signed-off-by: WangFengTu <wangfengtu@huawei.com>
---
 vendor/github.com/containers/storage/images.go | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/vendor/github.com/containers/storage/images.go b/vendor/github.com/containers/storage/images.go
index 0a5a953..f5c49a5 100644
--- a/vendor/github.com/containers/storage/images.go
+++ b/vendor/github.com/containers/storage/images.go
@@ -677,6 +677,9 @@ func (r *imageStore) AddName(id string, name string) error {
 		for _, name := range names {
 			if otherImage, ok := r.byname[name]; ok {
 				r.removeName(otherImage, name)
+				if err := r.SaveImage(otherImage); err != nil {
+					return err
+				}
 			}
 			r.byname[name] = image
 		}
-- 
2.19.1