mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-31 23:36:12 +00:00
vc: Check return value from os.MkdirAll in virtiofsdArgs
Fixes #2297 Signed-off-by: Ted Yu yuzhihong@gmail.com
This commit is contained in:
parent
d054556f60
commit
628799a42f
@ -662,7 +662,9 @@ func (clh *cloudHypervisor) virtiofsdArgs(sockPath string) ([]string, error) {
|
||||
|
||||
sourcePath := filepath.Join(kataHostSharedDir(), clh.id)
|
||||
if _, err := os.Stat(sourcePath); os.IsNotExist(err) {
|
||||
os.MkdirAll(sourcePath, os.ModePerm)
|
||||
if err = os.MkdirAll(sourcePath, os.ModePerm); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
args := []string{
|
||||
|
Loading…
Reference in New Issue
Block a user