]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/tx.go
Updated github.com/klauspost/compress without snappy dependency
[nncp.git] / src / tx.go
index 337bcfd879576d9bcc1cb653c9080db8c110da70..e096ed65f873ddeb48f9ac635a01bbeea8849ba2 100644 (file)
--- a/src/tx.go
+++ b/src/tx.go
@@ -60,7 +60,7 @@ func (ctx *Ctx) Tx(
        if areaId != nil {
                area = ctx.AreaId2Area[*areaId]
                if area.Prv == nil {
-                       return nil, errors.New("unknown area id")
+                       return nil, errors.New("area has no encryption keys")
                }
        }
        hops := make([]*Node, 0, 1+len(node.Via))
@@ -239,7 +239,7 @@ func (ctx *Ctx) Tx(
                seenDir := filepath.Join(
                        ctx.Spool, ctx.SelfId.String(), AreaDir, areaId.String(),
                )
-               seenPath := filepath.Join(seenDir, msgHash+SeenSuffix)
+               seenPath := filepath.Join(seenDir, msgHash)
                les := LEs{
                        {"Node", node.Id},
                        {"Nice", int(nice)},
@@ -257,7 +257,7 @@ func (ctx *Ctx) Tx(
                                msgHash,
                        )
                }
-               if err = os.MkdirAll(seenDir, os.FileMode(0777)); err != nil {
+               if err = ensureDir(seenDir); err != nil {
                        ctx.LogE("tx-mkdir", les, err, logMsg)
                        return lastNode, err
                }