]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/jobs.go
os.IsNotExists is deprecated
[nncp.git] / src / jobs.go
index 951298563cda819241a9c5d9c2c87554de2cfc4f..ff2977b22d1f9a369921033152617a3f9b1da8f3 100644 (file)
@@ -19,8 +19,10 @@ package nncp
 
 import (
        "bytes"
+       "errors"
        "fmt"
        "io"
+       "io/fs"
        "os"
        "path/filepath"
        "strings"
@@ -148,7 +150,7 @@ func (ctx *Ctx) jobsFind(nodeId *NodeId, xx TRxTx, nock, part bool) chan Job {
                                fd, err = os.Open(pth)
                        } else {
                                fd, err = os.Open(JobPath2Hdr(pth))
-                               if err != nil && os.IsNotExist(err) {
+                               if err != nil && errors.Is(err, fs.ErrNotExist) {
                                        hdrExists = false
                                        fd, err = os.Open(pth)
                                }