mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-09 03:48:05 +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)
|
sourcePath := filepath.Join(kataHostSharedDir(), clh.id)
|
||||||
if _, err := os.Stat(sourcePath); os.IsNotExist(err) {
|
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{
|
args := []string{
|
||||||
|
Loading…
Reference in New Issue
Block a user