diff options
-rw-r--r-- | ipc/uapi_bsd.go | 3 | ||||
-rw-r--r-- | ipc/uapi_linux.go | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/ipc/uapi_bsd.go b/ipc/uapi_bsd.go index 75cc0e3..a74a7ed 100644 --- a/ipc/uapi_bsd.go +++ b/ipc/uapi_bsd.go @@ -151,8 +151,7 @@ func UAPIOpen(name string) (*os.File, error) { // check if path exist - err := os.MkdirAll(socketDirectory, 0755) - if err != nil && !os.IsExist(err) { + if err := os.MkdirAll(socketDirectory, 0755); err != nil { return nil, err } diff --git a/ipc/uapi_linux.go b/ipc/uapi_linux.go index a3c95ca..dce6a45 100644 --- a/ipc/uapi_linux.go +++ b/ipc/uapi_linux.go @@ -148,8 +148,7 @@ func UAPIOpen(name string) (*os.File, error) { // check if path exist - err := os.MkdirAll(socketDirectory, 0755) - if err != nil && !os.IsExist(err) { + if err := os.MkdirAll(socketDirectory, 0755); err != nil { return nil, err } |