X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=src%2Fjobs.go;h=ff2977b22d1f9a369921033152617a3f9b1da8f3;hb=72f42f8288689ae89e021ba33ebca8d551a784d7;hp=ae18b74cfdaf3fad39883d85a9b938825dc1f8d0;hpb=b47dbfe6687569650fa544a4ecf3e4ea388390cb;p=nncp.git diff --git a/src/jobs.go b/src/jobs.go index ae18b74..ff2977b 100644 --- a/src/jobs.go +++ b/src/jobs.go @@ -1,6 +1,6 @@ /* NNCP -- Node to Node copy, utilities for store-and-forward data exchange -Copyright (C) 2016-2021 Sergey Matveev +Copyright (C) 2016-2023 Sergey Matveev 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 @@ -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) }