From c4f9e47a1b88a9b22cfe3374370ae89743f696c3 Mon Sep 17 00:00:00 2001 From: Qu Xuan Date: Fri, 17 Jan 2020 10:50:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=81=BF=E5=85=8D/opt/yunion/tmp?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E4=B8=8D=E5=AD=98=E5=9C=A8=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E9=95=9C=E5=83=8F=E5=88=9B=E5=BB=BA?= =?UTF-8?q?azure=E6=9C=8D=E5=8A=A1=E5=99=A8=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/multicloud/azure/storagecache.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/multicloud/azure/storagecache.go b/pkg/multicloud/azure/storagecache.go index 00011b4d34..15f53eb6de 100644 --- a/pkg/multicloud/azure/storagecache.go +++ b/pkg/multicloud/azure/storagecache.go @@ -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) }