]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/ctx.go
Merge branch 'develop'
[nncp.git] / src / ctx.go
index 645483d6805d132040b272a3db44632c41d7bec6..d83882800180f176b6fcf03ee632aba00a427ef8 100644 (file)
@@ -40,6 +40,7 @@ type Ctx struct {
        UmaskForce *int
        Quiet      bool
        ShowPrgrs  bool
+       HdrUsage   bool
        Debug      bool
        NotifyFile *FromToJSON
        NotifyFreq *FromToJSON
@@ -65,12 +66,12 @@ func (ctx *Ctx) FindNode(id string) (*Node, error) {
 func (ctx *Ctx) ensureRxDir(nodeId *NodeId) error {
        dirPath := filepath.Join(ctx.Spool, nodeId.String(), string(TRx))
        if err := os.MkdirAll(dirPath, os.FileMode(0777)); err != nil {
-               ctx.LogE("dir-ensure", SDS{"dir": dirPath}, err, "")
+               ctx.LogE("dir-ensure", LEs{{"Dir", dirPath}}, err, "")
                return err
        }
        fd, err := os.Open(dirPath)
        if err != nil {
-               ctx.LogE("dir-ensure", SDS{"dir": dirPath}, err, "")
+               ctx.LogE("dir-ensure", LEs{{"Dir", dirPath}}, err, "")
                return err
        }
        return fd.Close()