From 1147bbcf022af00c3568f8b85bf8a53cbdae814f Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Fri, 6 Jan 2017 14:46:59 +0300 Subject: [PATCH] Ensure neighboor directory existence during tossing --- src/cypherpunks.ru/nncp/toss.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cypherpunks.ru/nncp/toss.go b/src/cypherpunks.ru/nncp/toss.go index e95f7be..42090a8 100644 --- a/src/cypherpunks.ru/nncp/toss.go +++ b/src/cypherpunks.ru/nncp/toss.go @@ -49,6 +49,7 @@ func newNotification(fromTo *FromToYAML, subject string) io.Reader { } func (ctx *Ctx) LockDir(nodeId *NodeId, xx TRxTx) (*os.File, error) { + ctx.ensureRxDir(nodeId) lockPath := filepath.Join(ctx.Spool, nodeId.String(), string(xx)) + ".lock" dirLock, err := os.OpenFile( lockPath, -- 2.48.1