mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-08-25 01:54:08 -05:00
NAS: Use errors.Is for os instead of == operator
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"crypto/x509"
|
||||
"encoding/hex"
|
||||
"encoding/pem"
|
||||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -29,7 +30,7 @@ func downloadStage1(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
dat, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
if err == os.ErrNotExist {
|
||||
if errors.Is(err, os.ErrNotExist) {
|
||||
replyHTTPError(w, http.StatusNotFound, "404 Not Found")
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user