提交 72b17439 编写于 作者: M Medya Gh

clean up temp files

上级 71857f42
......@@ -331,6 +331,12 @@ func CacheImage(image, dst string) error {
if err != nil {
return err
}
defer func() { // clean up temp files
err := os.Remove(f.Name())
if err != nil {
glog.Infof("Failed to clean up the temp file %s : %v", f.Name(), err)
}
}()
tag, err := name.NewTag(image, name.WeakValidation)
if err != nil {
return err
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册