/*
NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2021 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2023 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
import (
"bytes"
+ "errors"
"fmt"
"io"
+ "io/fs"
"os"
"path/filepath"
"strings"
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)
}