mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 16:13:56 +08:00
Merge pull request #4938 from ioito/hotfix/qx-azure-image-update
fix: 避免/opt/yunion/tmp目录不存在导致自定义镜像创建azure服务器失败
This commit is contained in:
@@ -125,6 +125,10 @@ func (self *SStoragecache) UploadImage(ctx context.Context, userCred mcclient.To
|
||||
} else {
|
||||
log.Debugf("UploadImage: no external ID")
|
||||
}
|
||||
err := os.MkdirAll(options.Options.TempPath, os.ModePerm)
|
||||
if err != nil {
|
||||
log.Warningf("failed to create tmp path %s error: %v", options.Options.TempPath, err)
|
||||
}
|
||||
return self.uploadImage(ctx, userCred, image, isForce, options.Options.TempPath)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user