]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/cmd/nncp-xfer/main.go
Raise copyright years
[nncp.git] / src / cmd / nncp-xfer / main.go
index fb7a0e0807e1aa8edb45af08acce79ac65907527..c9be0de0cb74527f9876d982442813e96f03327a 100644 (file)
@@ -1,6 +1,6 @@
 /*
 NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2021 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2022 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
@@ -29,7 +29,7 @@ import (
        "path/filepath"
 
        "github.com/dustin/go-humanize"
-       "go.cypherpunks.ru/nncp/v7"
+       "go.cypherpunks.ru/nncp/v8"
 )
 
 func usage() {
@@ -423,7 +423,9 @@ Tx:
                                })
                                continue
                        }
-                       if _, err = os.Stat(filepath.Join(dstPath, pktName+nncp.SeenSuffix)); err == nil || !os.IsNotExist(err) {
+                       if _, err = os.Stat(filepath.Join(
+                               dstPath, nncp.SeenDir, pktName,
+                       )); err == nil || !os.IsNotExist(err) {
                                ctx.LogD("xfer-tx-seen", les, func(les nncp.LEs) string {
                                        return logMsg(les) + ": already seen"
                                })
@@ -518,7 +520,7 @@ Tx:
                                        })
                                        isBad = true
                                } else if ctx.HdrUsage {
-                                       os.Remove(job.Path + nncp.HdrSuffix)
+                                       os.Remove(nncp.JobPath2Hdr(job.Path))
                                }
                        }
                }