]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/toss.go
Replace YAML with Hjson
[nncp.git] / src / toss.go
index 6422ac7a8ccb7e575f923262fb6e9dd122bdedcb..2c4726f8cb7dc7fc2e94334fe8b97c1d3363eac6 100644 (file)
@@ -43,7 +43,7 @@ const (
        SeenSuffix = ".seen"
 )
 
-func newNotification(fromTo *FromToYAML, subject string) io.Reader {
+func newNotification(fromTo *FromToJSON, subject string) io.Reader {
        return strings.NewReader(fmt.Sprintf(
                "From: %s\nTo: %s\nSubject: %s\n",
                fromTo.From,
@@ -221,7 +221,7 @@ func (ctx *Ctx) Toss(
                                                isBad = true
                                                goto Closing
                                        }
-                                       dstPath = dstPathOrig + strconv.Itoa(dstPathCtr)
+                                       dstPath = dstPathOrig + "." + strconv.Itoa(dstPathCtr)
                                        dstPathCtr++
                                }
                                if err = os.Rename(tmp.Name(), dstPath); err != nil {