Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
vc: Check return value from os.MkdirAll in virtiofsdArgs
Browse files Browse the repository at this point in the history
Fixes #2297

Signed-off-by: Ted Yu [email protected]
  • Loading branch information
yutedz committed Nov 30, 2019
1 parent d054556 commit 628799a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion virtcontainers/clh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 628799a

Please sign in to comment.