From e5be78e740e3884393488a6a17ed80636d7be538 Mon Sep 17 00:00:00 2001 From: wanyaoqi Date: Wed, 20 Sep 2023 21:21:29 +0800 Subject: [PATCH] fix(host): insert iso name not correct --- pkg/hostman/storageman/imagecachemanager_local.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/hostman/storageman/imagecachemanager_local.go b/pkg/hostman/storageman/imagecachemanager_local.go index ab6de6a771..6ed4fb8d6c 100644 --- a/pkg/hostman/storageman/imagecachemanager_local.go +++ b/pkg/hostman/storageman/imagecachemanager_local.go @@ -157,7 +157,6 @@ func (c *SLocalImageCacheManager) PrefetchImageCache(ctx context.Context, data i ret.Path = imgCache.GetPath() var ( - name string size int64 ) if desc := imgCache.GetDesc(); desc != nil { @@ -172,7 +171,7 @@ func (c *SLocalImageCacheManager) PrefetchImageCache(ctx context.Context, data i ret.Size = fi.Size() } } - if len(name) == 0 { + if len(ret.Name) == 0 { ret.Name = input.ImageId }