mirror of
https://github.com/KusakabeShi/EtherGuard-VPN.git
synced 2024-11-22 23:33:09 +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
|
// check if path exist
|
||||||
|
|
||||||
err := os.MkdirAll(socketDirectory, 0755)
|
if err := os.MkdirAll(socketDirectory, 0755); err != nil {
|
||||||
if err != nil && !os.IsExist(err) {
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,8 +148,7 @@ func UAPIOpen(name string) (*os.File, error) {
|
|||||||
|
|
||||||
// check if path exist
|
// check if path exist
|
||||||
|
|
||||||
err := os.MkdirAll(socketDirectory, 0755)
|
if err := os.MkdirAll(socketDirectory, 0755); err != nil {
|
||||||
if err != nil && !os.IsExist(err) {
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user