]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/ctx.go
os.IsNotExists is deprecated
[nncp.git] / src / ctx.go
index 6232972d47a28cd6d77b5ebea6b359026b7327e2..cf7d728d42ec06564a30a501fa873c035b48d849 100644 (file)
@@ -20,6 +20,7 @@ package nncp
 import (
        "errors"
        "fmt"
+       "io/fs"
        "os"
        "path/filepath"
        "strconv"
@@ -79,7 +80,7 @@ func ensureDir(dirs ...string) error {
                }
                return fmt.Errorf("%s: is not a directory", p)
        }
-       if !os.IsNotExist(err) {
+       if !errors.Is(err, fs.ErrNotExist) {
                return err
        }
        return os.MkdirAll(p, os.FileMode(0777))