From: Sergey Matveev Date: Fri, 6 Jan 2017 11:46:59 +0000 (+0300) Subject: Ensure neighboor directory existence during tossing X-Git-Tag: 0.1~41 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1147bbcf022af00c3568f8b85bf8a53cbdae814f;p=nncp.git Ensure neighboor directory existence during tossing --- 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,