]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/toss.go
os.IsNotExists is deprecated
[nncp.git] / src / toss.go
index 2fab0a2e8cb3a304323e2e65a6c5bfdf687430d5..b4363f713ea7856a16df74e26ff5a10ae0413ae6 100644 (file)
@@ -24,6 +24,7 @@ import (
        "errors"
        "fmt"
        "io"
+       "io/fs"
        "log"
        "mime"
        "os"
@@ -356,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 {