]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/toss.go
os.IsNotExists is deprecated
[nncp.git] / src / toss.go
index 2d7eeede063884e855cfe119b9f8cb9c2cca64f3..b4363f713ea7856a16df74e26ff5a10ae0413ae6 100644 (file)
@@ -24,7 +24,7 @@ import (
        "errors"
        "fmt"
        "io"
-       "io/ioutil"
+       "io/fs"
        "log"
        "mime"
        "os"
@@ -357,7 +357,7 @@ func jobProcess(
                        dstPathCtr := 0
                        for {
                                if _, err = os.Stat(dstPath); err != nil {
-                                       if os.IsNotExist(err) {
+                                       if errors.Is(err, fs.ErrNotExist) {
                                                break
                                        }
                                        ctx.LogE("rx-stat", les, err, func(les LEs) string {
@@ -475,7 +475,7 @@ func jobProcess(
                        )
                        return err
                }
-               dstRaw, err := ioutil.ReadAll(pipeR)
+               dstRaw, err := io.ReadAll(pipeR)
                if err != nil {
                        ctx.LogE("rx-read", les, err, func(les LEs) string {
                                return fmt.Sprintf(