Replace uses of os.IsExist and os.IsNotExist with errors.Is.
The former don't properly unwrap errors.
This commit is contained in:
+1
-1
@@ -95,7 +95,7 @@ func Update() *configuration {
|
||||
found = true
|
||||
file, err := os.Open(ICEFilename)
|
||||
if err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
if !errors.Is(err, os.ErrNotExist) {
|
||||
log.Printf("Open %v: %v", ICEFilename, err)
|
||||
} else {
|
||||
found = false
|
||||
|
||||
Reference in New Issue
Block a user