Replace uses of os.IsExist and os.IsNotExist with errors.Is.
The former don't properly unwrap errors.
This commit is contained in:
1 parent
68887f13d5
commit
3409f5a27f
10 files changed
+21
-19
No files matched your search
@@ -264,7 +264,7 @@ func openDiskFile(directory, username, extension string) (*os.File, error) {
|
||||
)
|
||||
if err == nil {
|
||||
return f, nil
|
||||
} else if !os.IsExist(err) {
|
||||
} else if !errors.Is(err, os.ErrExist) {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user