return error if make dir failed when setting up azure file volume

pull/58/head
mlmhl 2018-09-25 20:16:08 +08:00
parent a94ea824eb
commit 867a717fb1
1 changed files with 3 additions and 1 deletions

View File

@ -269,7 +269,9 @@ func (b *azureFileMounter) SetUpAt(dir string, fsGroup *int64) error {
if runtime.GOOS == "windows" {
mountOptions = []string{fmt.Sprintf("AZURE\\%s", accountName), accountKey}
} else {
os.MkdirAll(dir, 0700)
if err := os.MkdirAll(dir, 0700); err != nil {
return err
}
// parameters suggested by https://azure.microsoft.com/en-us/documentation/articles/storage-how-to-use-files-linux/
options := []string{fmt.Sprintf("username=%s,password=%s", accountName, accountKey)}
if b.readOnly {