mirror of
https://github.com/KusakabeShi/EtherGuard-VPN.git
synced 2024-11-22 15:23:08 +01:00
ipc: remove unnecessary error check
os.MkdirAll never returns an os.IsExist error. Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
parent
28c4d04304
commit
c8596328e7
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user