提交 50dcda4b 编写于 作者: K kairen 提交者: dlorenc

Fix the image cache delete

上级 8f91c37b
......@@ -17,7 +17,6 @@ limitations under the License.
package machine
import (
"golang.org/x/sync/errgroup"
"io/ioutil"
"os"
"os/exec"
......@@ -25,6 +24,8 @@ import (
"runtime"
"strings"
"golang.org/x/sync/errgroup"
"k8s.io/minikube/pkg/minikube/assets"
"k8s.io/minikube/pkg/minikube/bootstrapper"
"k8s.io/minikube/pkg/minikube/config"
......@@ -223,6 +224,7 @@ func LoadFromCacheBlocking(cmd bootstrapper.CommandRunner, src string) error {
func DeleteFromImageCacheDir(images []string) error {
for _, image := range images {
path := filepath.Join(constants.ImageCacheDir, image)
path = sanitizeCacheDir(path)
glog.Infoln("Deleting image in cache at ", path)
if err := os.Remove(path); err != nil {
return err
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册