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 }